/* ===========================================================
   COSMODESTINO VINTAGE RETRO STYLE — style.css (MOBILE-FIRST)
   Branding: CosmoDestino | vintage_retro | Flexbox Only
   =========================================================== */

/* ===== Reset & Normalize ===== */
html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; margin: 0; padding: 0; }
body, html { height: 100%; scroll-behavior: smooth; }
body { background: #F5EDD7; color: #17344E; font-family: 'Open Sans', Arial, sans-serif; line-height: 1.6; font-size: 16px; }
ul, ol { list-style: disc inside; padding-left: 0; }
a { color: #17344E; text-decoration: none; transition: color 0.2s; }
a:focus { outline: 2px dotted #DCB84A; outline-offset: 3px; }
img { max-width: 100%; display: block; border-style: none; }
button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  border: none;
  background: none;
  color: inherit;
}
:focus-visible { outline: 2px dotted #DCB84A; outline-offset: 2px; }

/* ===== Vintage Retro Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Open+Sans:wght@400;700&display=swap');
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  letter-spacing: 0.03em;
  color: #17344E;
  font-weight: 900;
}
h1 { font-size: 2.2rem; margin-bottom: 24px; }
h2 { font-size: 1.6rem; margin-bottom: 20px; }
h3 { font-size: 1.25rem; margin-bottom: 16px; color: #6C3C1B; font-weight: 700; }
h4, h5, h6 { font-size: 1.1rem; margin-bottom: 10px; }
p { font-size: 1rem; margin-bottom: 16px; }

/* ===== Vintage Retro Color Palette ===== */
:root {
  --primary: #17344E;
  --secondary: #DCB84A;
  --accent: #F4F6FA;
  --cream: #F5EDD7;
  --vintage-blue: #5D7191;
  --vintage-mauve: #BA7C6C;
  --vintage-orange: #D17C45;
  --vintage-green: #689B88;
  --vintage-brown: #6C3C1B;
  --vintage-shadow: rgba(75,56,13,0.10);
}

body { background: var(--cream); color: var(--primary); }

/* ===== Layout Containers ===== */
.container {
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
  padding: 0 16px;
}
.content-wrapper {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--accent);
  border-radius: 18px;
  box-shadow: 0 2px 10px var(--vintage-shadow);
}

/* ===== Flex Layout Patterns ===== */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { background: #fff; margin-bottom: 20px; position: relative; border-radius: 14px; box-shadow: 0 1.5px 7px var(--vintage-shadow); transition: box-shadow .25s;
  border: 2px solid var(--vintage-blue); padding: 24px; min-width: 260px; }
.card:hover { box-shadow: 0 6px 14px var(--vintage-shadow); border-color: var(--secondary); }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card {
  display: flex; align-items: center; gap: 20px; padding: 20px 24px;
  background: #fff; border-radius: 16px; margin-bottom: 20px;
  box-shadow: 0 1.5px 7px var(--vintage-shadow);
  border-left: 6px solid var(--secondary);
  font-size: 1.07rem;
  color: #312314; /* readable dark text */
}
.testimonial-card p { color: #312314; font-style: italic; margin-bottom: 10px; }
.testimonial-card span { font-weight: bold; font-size: 0.96rem; color: var(--primary);  }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ==== Feature Grid Retro Pattern ===== */
.feature-grid, .card-grid { display: flex; flex-wrap: wrap; gap: 24px; margin-top:16px; }
.feature-grid > div, .card-grid > div {
  background: #fffbe8;
  border: 2px solid var(--vintage-mauve);
  border-radius: 15px;
  box-shadow: 0 1.5px 7px var(--vintage-shadow);
  flex: 1 1 260px; min-width: 220px;
  padding: 28px 20px;
  transition: border-color .2s, box-shadow .2s;
  text-align: center;
}
.feature-grid > div:hover,
.card-grid > div:hover { border-color: var(--secondary); box-shadow: 0 5px 14px rgba(148,110,65,.08); }
.feature-grid img, .card-grid img { height: 48px; margin: 0 auto 16px auto; }

/* ===== Buttons & Call to Action ===== */
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--secondary);
  color: var(--primary);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 900; letter-spacing: 0.04em;
  font-size: 1.14rem; padding: 13px 32px; border-radius: 30px;
  box-shadow: 0 1.5px 7px var(--vintage-shadow);
  margin: 16px 0;
  cursor: pointer; border: none;
  border: 2px solid var(--secondary);
  transition: background 0.17s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.cta-btn:hover, .cta-btn:focus {
  background: var(--primary);
  color: var(--secondary);
  border-color: var(--primary);
  box-shadow: 0 5px 18px var(--vintage-shadow);
  text-decoration: none;
}

/* ====== Lists & Typography ====== */
ul {
  margin-bottom: 16px;
  padding-left: 24px;
  font-size: 1rem;
}
ul li { margin-bottom: 10px; }
address { font-style: normal; line-height: 1.6; }

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(96deg, #DCB84A 0%, #F5EDD7 38%, #5D7191 98%);
  color: var(--primary);
  border-radius: 0 0 45px 45px;
  box-shadow: 0 7px 30px var(--vintage-shadow);
  margin-bottom: 38px;
  padding-top: 44px;
}
.hero h1, .hero h2 {
  color: var(--primary);
  text-shadow: 0 1px 0 #fff7d3, 0 2px 6px #eee8cc88;
  margin-bottom:18px;
}
.hero p { color: #312314; }
.hero .cta-btn { margin-top: 8px; }

/* ===== Header & Nav Retro ===== */
header {
  background: #fffbe8;
  border-bottom: 4px double var(--secondary);
  box-shadow: 0 1.5px 7px var(--vintage-shadow);
  padding-top: 0;
  position: relative;
  z-index: 50;
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 18px 0 10px 0;
  font-family: 'Montserrat', Arial, sans-serif;
}
.main-nav a {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 15px;
  transition: background 0.14s, color 0.16s;
}
.main-nav a:hover,
.main-nav a:focus {
  background: var(--vintage-blue);
  color: #fff;
}
.main-nav .cta-btn {
  margin-left: auto;
  background: var(--vintage-brown);
  color: #fffbe8;
  font-weight: 900;
  font-size: 1.09rem;
  border-radius: 22px;
  letter-spacing: 0.11em;
}
.main-nav .cta-btn:hover {
  background: var(--secondary);
  color: var(--primary);
}
.main-nav img { height: 42px; margin-right: 8px; }

/* Mobile burger menu button */
.mobile-menu-toggle {
  display: flex;
  position: absolute;
  right: 18px;
  top: 18px;
  background: var(--secondary);
  color: var(--primary);
  border: none;
  font-size: 1.8rem;
  border-radius: 50%;
  padding: 7px 13px;
  z-index: 120;
  cursor: pointer;
  transition: background 0.15s, color 0.18s;
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background: var(--primary); color: var(--secondary);
}
@media (min-width: 1025px) {
  .mobile-menu-toggle { display: none; }
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  z-index: 2000;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(245,237,215,0.96);
  box-shadow: 0 2px 35px var(--vintage-shadow);
  transform: translateX(-100vw);
  opacity: 0; transition: transform .38s cubic-bezier(.7,.2,.3,1), opacity .32s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px 0 0 0;
}
.mobile-menu.open { transform: translateX(0); opacity: 1; }
.mobile-menu-close {
  background: none; border: none; color: var(--primary);
  font-size: 2.3rem; padding: 10px 22px;
  align-self: flex-end; cursor: pointer;
  transition: color 0.15s;
}
.mobile-menu-close:hover { color: var(--secondary); }
.mobile-nav {
  display: flex; flex-direction: column; gap: 6px;
  align-items: flex-start; padding: 24px 40px;
  width: 100%;
}
.mobile-nav a {
  font-size: 1.2rem; color: var(--primary);
  font-weight: bold; background: none;
  margin: 7px 0;
  padding: 10px 0 10px 8px;
  border-radius: 10px;
  width: 100%;
  transition: background 0.16s, color 0.13s;
}
.mobile-nav a:hover, .mobile-nav a:focus { background: var(--secondary); color: var(--primary); }

@media (min-width: 1025px) {
  .mobile-menu { display: none !important; }
  .main-nav { justify-content: flex-start; }
}

/* Hide main nav on mobile, show only burger */
@media (max-width: 1024px) {
  .main-nav {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex !important;
  }
}

/* ===== Footer ===== */
footer section {
  background: #fffbe8;
  border-top: 4px double var(--secondary);
  box-shadow: 0 -1.5px 7px var(--vintage-shadow);
  margin-top: 40px;
  padding: 38px 0 24px 0;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 22px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 0.99rem;
}
.footer-nav a { color: var(--primary); font-weight: 600; padding: 4px 8px; border-radius: 10px; }
.footer-nav a:hover, .footer-nav a:focus { background: var(--secondary); color: #312314; }
.footer-contact {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; margin-bottom: 12px;
}
.footer-contact img { height: 38px; margin-bottom: 10px; }
.footer-contact p {
  color: #655a3a;
  display: flex; align-items: center;
  font-size: 1rem;
  gap: 7px;
  margin-bottom: 6px;
}
.footer-contact img[alt^="Dirección"],
.footer-contact img[alt^="Teléfono"],
.footer-contact img[alt^="Correo"],
.footer-contact img[alt^="Horario"] {
  height: 1.1em;
  margin-right: 7px;
}
.footer-social {
  display: flex; gap: 17px;
  margin: 10px 0 13px 0;
  justify-content: center;
}
.footer-social a img {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1.5px 7px var(--vintage-shadow);
  height: 33px; width: 33px;
  padding: 4px;
  transition: background 0.14s;
}
.footer-social a:hover img { background: var(--secondary); }
footer .cta-btn { font-size: 1rem; margin-top: 8px; }
footer p { text-align: center; font-size: 0.96rem; margin-top: 18px; color: #655a3a; }

/* ===== Content Sections, Cards, Testimonials ===== */
.text-section { margin-bottom: 24px; }
.text-section h2, .text-section h3 { color: var(--primary); margin-bottom: 12px; }
.text-section ul { padding-left: 16px; }

/* ===== Accessibility Contrast for Testimonials ===== */
.testimonial-card {
  background: #fff;
  color: #1e1922;
  box-shadow: 0 2.5px 12px rgba(44,29,10,.12);
}

/* ===== Cookie Consent Banner & Modal ===== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #6C3C1B;
  color: #fffbe8;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 18px 30px 20px 30px;
  z-index: 20000;
  box-shadow: 0 -3.5px 23px rgba(44,29,10,.14);
  font-size: 1rem;
  animation: fadein-bottom .45s cubic-bezier(.41,.75,.25,1);
}
@keyframes fadein-bottom { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
.cookie-banner p { margin-bottom: 0; }
.cookie-banner .cookie-btn-group { display: flex; gap: 16px; margin: 8px 0; }
.cookie-banner button {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: bold;
  border-radius: 17px;
  color: var(--primary);
  background: var(--secondary);
  padding: 7px 20px;
  box-shadow: 0 1.5px 7px var(--vintage-shadow);
  cursor: pointer; border: none;
  transition: background 0.14s, color 0.16s;
  margin-top: 0;
}
.cookie-banner button:hover, .cookie-banner button:focus { background: var(--primary); color: var(--secondary); }
.cookie-banner .cookie-btn-secondary {
  background: #F5EDD7;
  color: var(--vintage-brown);
}
.cookie-banner .cookie-btn-secondary:hover { background: var(--vintage-mauve); color: #fffbe8; }

/* Cookie Modal */
.cookie-modal-overlay {
  position: fixed; z-index: 30000; left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(24,33,37,0.38);
  display: flex; justify-content: center; align-items: center;
  animation: fadein-modal .29s cubic-bezier(.44,.96,.19,.95);
}
@keyframes fadein-modal { from { opacity:0; } to { opacity:1; } }
.cookie-modal {
  background: #fffbe8;
  color: var(--primary);
  border-radius: 22px;
  box-shadow: 0 6px 30px var(--vintage-shadow);
  padding: 38px 30px 30px 30px;
  max-width: 460px;
  width: calc(100vw - 40px);
  display: flex; flex-direction: column; gap: 23px;
  align-items: center;
  position: relative;
  border: 2px solid var(--secondary);
}
.cookie-modal h3 {
  font-size: 1.18rem;
  margin-bottom: 12px;
  color: var(--vintage-brown);
}
.cookie-modal .cookie-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 13px 0;
  width: 100%;
  font-size: 1.01rem;
}
.cookie-modal label {
  font-size: 1.01rem;
  color: var(--primary); font-weight: 600;
}
.cookie-modal .cookie-switch {
  appearance: none;
  width: 38px; height: 22px; border-radius: 17px;
  background: #BA7C6C; /* Default inactive color */
  position: relative; outline: none; cursor: pointer;
  transition: background 0.2s;
}
.cookie-modal .cookie-switch:checked {
  background: var(--secondary);
}
.cookie-modal .cookie-switch:before {
  content: "";
  display: block; position: absolute; left: 3px; top: 2.7px;
  width: 17px; height: 17px;
  background: #fffbe8;
  border-radius: 50%;
  transition: left 0.2s;
}
.cookie-modal .cookie-switch:checked:before {
  left: 17px;
}
.cookie-modal .cookie-modal-close {
  background: none; border: none; font-size: 1.7rem;
  color: var(--vintage-mauve);
  position: absolute; right: 19px; top: 14px;
  cursor: pointer;
  z-index: 2;
}
.cookie-modal .cookie-btn-group { display: flex; gap: 18px; align-items: center; }
.cookie-modal button {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 16px;
  color: var(--primary);
  background: var(--secondary);
  padding: 9px 21px;
  margin-top: 0;
  transition: background 0.15s, color 0.13s;
  border: none;
  cursor: pointer;
}
.cookie-modal button:hover, .cookie-modal button:focus {
  background: var(--primary); color: var(--secondary);
}
.cookie-modal .cookie-btn-secondary { background: #F5EDD7; color: var(--vintage-brown); }
.cookie-modal .cookie-btn-secondary:hover { background: var(--vintage-mauve); color: #fffbe8; }

/* ===== Responsive Queries ===== */
@media (max-width: 920px) {
  .feature-grid > div, .card-grid > div { min-width: 160px; padding: 22px 10px; }
  .main-nav .cta-btn { padding: 13px 18px; font-size: 1rem; }
}
@media (max-width: 768px) {
  .container { max-width: 95vw; padding: 0 7px; }
  .content-wrapper { gap: 18px; }
  .section { margin-bottom: 35px; padding: 22px 6px; border-radius: 10px; }
  .feature-grid, .card-grid { gap: 14px; }
  .feature-grid > div, .card-grid > div  { min-width: 120px; padding: 13px 7px; font-size: .96rem; }
  .testimonial-card { padding: 14px 12px; gap: 12px; border-radius: 10px; }
  .mobile-menu { padding: 18px 0 0 0; }
  .hero { padding-top: 18px; border-radius: 0 0 22px 22px; font-size: .99rem;  }
}
@media (max-width: 640px) {
  h1 { font-size: 1.32rem; }
  h2 { font-size: 1.08rem; margin-bottom: 12px; }
  h3 { font-size: .99rem; }
  .cta-btn { font-size: .96rem; padding: 10px 13px; }
}
@media (max-width: 550px) {
  .footer-nav { flex-direction: column; gap: 3px 0; font-size: 0.95rem; }
  .footer-contact p { font-size: .95rem; }
  .footer-social { gap: 9px; }
  .feature-grid, .card-grid { flex-direction: column; gap: 11px; }
  .feature-grid > div, .card-grid > div { margin-bottom: 7px; }
  .testimonial-card { font-size: .98rem; padding: 11px 7px; }
  .cookie-banner { padding: 14px 4px; font-size: .96rem; }
  .cookie-modal { padding: 26px 5vw 14px 5vw; }
}
/* ==== Mobile Content Patterns ==== */
@media (max-width: 1024px) {
  .text-image-section { flex-direction: column; gap: 14px; }
}
/* Ensure spacing between all .card, .testimonial-card, .section elements */
.card + .card,
.testimonial-card + .testimonial-card,
.section + .section,
.feature-grid > div + div,
.card-grid > div + div { margin-top: 20px !important; }

/* ==== Subtle Retrowave Separators ==== */
.section:not(:last-child):after {
  content: "";
  display: block;
  width: 60px;
  height: 5px;
  background: repeating-linear-gradient(90deg,#DCB84A,#DCB84A 16px,#E7B884 20px,#E7B884 32px);
  border-radius: 10px;
  margin: 35px auto 0 auto;
  opacity: .23;
}

/* ==== Form Fields (if present) ==== */
input, textarea, select {
  background: #fffbe8;
  border: 2px solid var(--secondary);
  border-radius: 11px;
  padding: 9px 13px;
  font-size: 1rem;
  margin-bottom: 14px;
  transition: border-color .18s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
}

/* ==== Micro-interactions (subtle wobble for icons on hover) ==== */
.footer-social a:hover img, .main-nav a:hover img, .feature-grid > div:hover img {
  animation: wobble 0.38s ease;
}
@keyframes wobble {
  0% { transform: rotate(0deg); }
  16% { transform: rotate(-9deg); }
  33% { transform: rotate(10deg); }
  50% { transform: rotate(-6deg); }
  66% { transform: rotate(7deg); }
  83% { transform: rotate(-2deg); }
  100% { transform: rotate(0deg); }
}

/* == Accessibility: Focus State for Buttons and Links == */
button:focus, .cta-btn:focus, .mobile-menu-close:focus {
  outline: 2px dotted var(--vintage-mauve);
  outline-offset: 2px;
}

/* ==== Hide elements when not needed ==== */
@media (max-width: 1024px) {
  .main-nav { display: none !important; }
}
@media (min-width: 1025px) {
  .mobile-menu { display: none !important; }
  .mobile-menu-toggle { display: none !important; }
}

/* ==== Custom Scrollbar Styling (optional for retro effect) ==== */
body::-webkit-scrollbar {
  width: 11px;
  background: #e7cf9e;
}
body::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 13px;
}
body::-webkit-scrollbar-thumb:hover { background: var(--vintage-mauve); }

/* ========================================================================
   NO CSS GRID, NO COLUMNS, FLEXBOX ONLY — ALL SPACING ENFORCED AS REQUESTED
   ======================================================================== */
