/* Variables y colores base */
:root {
  --color-fondo: #fdfaf6;
  --color-principal: #502e1b;
  --color-secundario: #a87b4d;
  --color-acento: #d6673e;
  --color-fondo-header: #fff7ec;
  --color-fondo-footer: #f4ede3;
  --color-borde: #e0d5c1;
}

/* Reglas generales */
body {
  background-color: var(--color-fondo);
  color: var(--color-principal);
  font-family: 'Inter', sans-serif;
}

/* Títulos especiales */
h1,
h2,
h3 {
  font-family: 'Playfair Display', serif;
}

/* Correcciones a Tailwind si rompe visualmente en updates */
.navbar a {
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: var(--color-acento);
}

/* Fix dropdown "quedarse abierto" */
.dropdown-content {
  transition: opacity 0.2s ease-in-out;
}

/* Fallback para imágenes si Tailwind lo rompe */
img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* Media queries o ajustes finos extra */
@media (max-width: 640px) {
  .title-group {
    text-align: center;
  }
}

/* Refuerzo para evitar parpadeos en mobile dropdowns */
details summary {
  padding: 0.3rem 0;
  font-weight: 600;
  color: #502e1b;
}

details[open] summary {
  color: #d6673e;
}

/* Login Flip Styles */
.flip-container {
  perspective: 1200px;
  width: 100%;
  max-width: 420px;
  min-height: 500px;
}

.flipper {
  transition: transform 0.8s ease-in-out;
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 100%;
}

.flipped .flipper {
  transform: rotateY(180deg);
}

.front,
.back {
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem;
  background-color: white;
  border-radius: 0.75rem;
  border: 1px solid #e0d5c1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.back {
  transform: rotateY(180deg);
}

/* Responsive padding */
@media (max-width: 640px) {
  .front,
  .back {
    padding: 1.5rem;
  }
}

#loaderWrapper {
  position: fixed;
  z-index: 9999;
  background-color: #1a1108; /* fondo oscuro o el que quieras */
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  border: 3px solid;
  border-color: #FFF #FFF transparent transparent;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}
.loader::after,
.loader::before {
  content: '';  
  box-sizing: border-box;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  border: 3px solid;
  border-color: transparent transparent #FF3D00 #FF3D00;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  animation: rotationBack 0.5s linear infinite;
  transform-origin: center center;
}
.loader::before {
  width: 32px;
  height: 32px;
  border-color: #FFF #FFF transparent transparent;
  animation: rotation 1.5s linear infinite;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes rotationBack {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

/* ==== LANDING IMPROVEMENTS ==== */

section {
  scroll-margin-top: 90px;
}

h2, h3 {
  letter-spacing: -0.5px;
}

.bg-card {
  background: radial-gradient(circle at top, #fffaf3, #fff2e3);
}

/* botones con vibra orgánica */
.btn-machi {
  background-color: var(--color-acento);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: .6rem;
  transition: background 0.3s ease;
}

.btn-machi:hover {
  background-color: #e87954;
}

/* sombras suaves mármol */
.shadow-machi {
  box-shadow: 0 8px 20px rgba(80, 46, 27, .08);
}

.grid > div {
    border-radius: 14px;
}

h3 {
    letter-spacing: -0.4px;
}

.shadow-sm:hover {
    transform: translateY(-2px);
}

.card-machi {
    background: #fff9f2;
    border: 1px solid #e0d5c1;
    border-radius: 14px;
    padding: 22px 28px;
    width: 300px;              /* <-- 🔥 clave: tamaño fijo */
    min-height: 200px;
    text-align: center;
    transition: 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.card-machi:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.card-machi h4 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: #502e1b;
    font-weight: 600;
}

.card-machi p {
    font-size: 0.9rem;
    color: #6b4a34;
    line-height: 1.4rem;
}

.icon-machi {
    font-size: 40px;
    color: #d6673e;
    margin-bottom: 12px;
}
