/* ==================================================  */
/* CSS RESET & NORMALIZE (Professional Corporate Base) */
/* ==================================================  */

html {
  box-sizing: border-box;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
body {
  background: #f6f7fa;
  color: #20263a;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}
a {
  color: #153868;
  text-decoration: none;
  transition: color 0.22s cubic-bezier(0.4,0,0.2,1);
}
a:hover, a:focus {
  color: #E84C27;
  outline: none;
}
ul, ol {
  list-style: none;
  padding-left: 0;
}
table {
  border-collapse: collapse;
  width: 100%;
}
th, td {
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid #e6eaf0;
  font-size: 1rem;
}
th {
  background: #153868;
  color: #fff;
  font-weight: 700;
}

/* ================== Brand Variables ================== */
:root {
  --color-primary: #153868;
  --color-secondary: #E84C27;
  --color-accent: #FFD470;
  --color-light: #fff;
  --color-bg: #f6f7fa;
  --color-gray: #e6eaf0;
  --color-dark-text: #20263a;
  --color-paragraph: #2b3246;
  --color-muted: #838ea7;
  --shadow-card: 0 2px 14px 0 rgba(21, 56, 104, 0.08);
  --radius-card: 12px;
  --radius-btn: 6px;
}

/* =============== Typography Scale ================ */
h1, .h1 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  font-size: 2.375rem;
  margin-bottom: 20px;
  letter-spacing: -1px;
  color: var(--color-primary);
  line-height: 1.12;
}
@media (min-width: 768px) {
  h1, .h1 { font-size: 3rem; }
}
h2, .h2 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
  color: var(--color-primary);
}
@media (min-width: 768px) {
  h2, .h2 { font-size: 2.1rem; }
}
h3, .h3 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 1.135rem;
  margin-bottom: 14px;
  color: var(--color-primary);
}
strong {
  font-weight: 700;
  color: var(--color-primary);
}
p {
  color: var(--color-paragraph);
  font-size: 1rem;
  margin-bottom: 16px;
}

/* ================= Layout Containers ============== */
.container {
  width: 100%;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 18px;
  padding-right: 18px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-light);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ============== Header & Navigation ================ */
header {
  background: var(--color-light);
  box-shadow: 0 1px 5px 0 rgba(21,56,104,0.05);
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 69px;
  gap: 18px;
}
header img {
  width: 134px;
  height: auto;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav a {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-primary);
  letter-spacing: 0.01em;
  padding: 7px 10px;
  border-radius: var(--radius-btn);
  transition: background 0.18s, color 0.18s;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--color-gray);
  color: var(--color-secondary);
}
.cta-button {
  background: var(--color-secondary);
  color: #fff !important;
  border: none;
  border-radius: var(--radius-btn);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
  padding: 12px 28px;
  margin-left: 10px;
  box-shadow: 0 1px 6px 0 rgba(232,76,39, 0.12);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.14s;
  display: inline-block;
  position: relative;
}
.cta-button:hover, .cta-button:focus {
  background: #be361c;
  color: #fff;
  transform: translateY(-2px) scale(1.03);
}

/* ======= Hamburger Menu (Mobile) ======= */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: #fff;
  font-size: 2rem;
  border: none;
  border-radius: 50%;
  margin-left: auto;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
  z-index: 1201;
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background: var(--color-secondary);
  color: #fff;
}

@media (min-width: 990px) {
  .mobile-menu-toggle { display: none; }
}

/* ========== MOBILE MENU OVERLAY ========== */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(21,56,104, 0.97);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.83, 0, 0.17, 1);
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: auto;
  opacity: 1;
}
.mobile-menu-close {
  align-self: flex-end;
  margin: 14px 26px 0 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  transition: color 0.15s;
  position: relative;
  z-index: 2;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--color-accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 36px 38px;
  width: 100%;
}
.mobile-nav a {
  color: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 12px 0;
  border-radius: var(--radius-btn);
  transition: background 0.14s, color 0.14s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-secondary);
  color: var(--color-accent);
}
@media (min-width: 990px) {
  .mobile-menu {
    display: none;
  }
}

/* ======= Responsive hide nav/show burger ======= */
@media (max-width: 989px) {
  .main-nav {
    display: none;
  }
  .cta-button {
    margin-left: 0;
    margin-right: 10px;
  }
}

/* =========== Section & Card Layouts =========== */
.features, .feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
}
.features .container { padding: 0; }
.feature-grid {
  gap: 24px;
  justify-content: flex-start;
}
.feature-grid li {
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  padding: 30px 24px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  min-width: 230px;
  flex: 1 1 260px;
  margin-bottom: 20px;
  transition: box-shadow 0.20s, transform 0.15s;
}
.feature-grid li:hover, .feature-grid li:focus-within {
  box-shadow: 0 4px 18px 0 rgba(21,56,104,0.13);
  transform: translateY(-4px) scale(1.03);
}
.feature-grid img {
  width: 48px;
  height: 48px;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  position: relative;
  flex: 1 1 300px;
  min-width: 240px;
  padding: 24px 20px;
  transition: box-shadow 0.20s;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.card:hover, .card:focus-within {
  box-shadow: 0 4px 14px 0 rgba(21, 56, 104, 0.18);
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.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;
}
.text-image-section > * {
  flex: 1 1 300px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.section:not(:last-child) {
  margin-bottom: 60px;
}

/* =========== Testimonial and Review Cards ============ */
.testimonials, .testimonials-section {
  background: var(--color-bg);
  border-radius: var(--radius-card);
  padding: 40px 20px;
  margin-bottom: 60px;
}
.testimonials h2, .testimonials-section h1, .testimonials-section h2 {
  color: var(--color-primary);
  margin-bottom: 24px;
}
.testimonial-card, .student-story {
  background: #fff;
  color: var(--color-dark-text);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  transition: box-shadow 0.19s, transform 0.13s;
}
.testimonial-card:hover, .student-story:hover {
  box-shadow: 0 4px 13px 0 rgba(21, 56, 104, 0.13);
  transform: translateY(-2px) scale(1.01);
}
.testimonial-card p, .student-story p {
  color: var(--color-paragraph);
  margin-bottom: 0;
  font-size: 1.11rem;
}
.testimonial-card strong, .student-story strong {
  color: var(--color-secondary);
}
.rating-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: bold;
}
.rating-summary img {
  width: 22px;
  height: 22px;
}

/* ========== CTAs & Promo Sections ========== */
.cta-section {
  background: var(--color-primary);
  color: #fff;
  padding: 32px 20px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 60px;
}
.cta-section strong {
  color: var(--color-accent);
  font-size: 1.3rem;
  margin-right: 20px;
}
.cta-section .cta-button {
  background: var(--color-accent);
  color: var(--color-primary) !important;
  font-weight: 800;
}
.cta-section .cta-button:hover {
  background: #ffd470cc;
}

/* =========== Footer ========== */
footer {
  background: #17243C;
  color: #fff;
  padding: 44px 0 20px 0;
  margin-top: 60px;
  font-size: 1rem;
}
footer .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}
.footer-logo img {
  width: 76px;
  margin-bottom: 2px;
  filter: drop-shadow(0 2px 8px rgba(21,56,104,0.13));
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 8px;
}
.footer-nav a {
  color: var(--color-accent);
  font-size: 0.97rem;
  font-weight: 600;
  transition: color 0.15s, text-decoration 0.13s;
  text-decoration: underline transparent;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: #fff;
  text-decoration: underline var(--color-accent);
}
.footer-contact {
  color: #f4f6fa;
  line-height: 1.5;
  font-size: 0.97rem;
}
.footer-contact img {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
}
.footer-copy {
  color: #d6dae2;
  font-size: 0.93rem;
  margin-top: 16px;
}

/* ========== About, Legal, and General Content ========= */
.legal-section, .about-section, .history-section, .benefits-section,
.services-section, .audiences-section, .methodology-section,
.schedule-section, .pricing-section, .faq-section, .team-section,
.values-section, .confirmation-section, .contact-section, .milestones-section {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 40px 22px;
  margin-bottom: 60px;
}
.legal-section h1, .about-section h1, .confirmation-section h1, .contact-section h1, .team-section h1, .services-section h1 {
  color: var(--color-primary);
}
.legal-section ul, .about-section ul, .history-section ul, .benefits-section ul, .faq-section ul, .services-section ul, .audiences-section ul, .methodology-section ul, .milestones-section ul, .team-member ul {
  margin-left: 24px;
  list-style: disc outside;
  color: var(--color-paragraph);
  margin-bottom: 18px;
  padding-left: 0px !important;
}
.legal-section ul li, .about-section ul li, .history-section ul li, .benefits-section ul li, .faq-section ul li, .services-section ul li, .audiences-section ul li, .methodology-section ul li, .milestones-section ul li, .team-member ul li {
  margin-bottom: 8px;
}
/* team/member block design */
.team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 26px;
}
.team-member {
  background: var(--color-bg);
  border-radius: var(--radius-card);
  box-shadow: 0 2px 8px 0 rgba(21, 56, 104, 0.08);
  padding: 28px 20px;
  min-width: 240px;
  flex: 1 1 280px;
  margin-bottom: 20px;
}
.team-member strong {
  font-size: 1.18rem;
  color: var(--color-primary);
}
/* Map in Contacto */
.map-location {
  background: var(--color-bg);
  border-radius: var(--radius-card);
  padding: 20px 18px;
  margin-top: 16px;
}
.text-section ul {
  margin-left: 0;
  list-style: none;
}
.text-section li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.text-section img {
  width: 19px;
  height: 19px;
}

/* ============ Cookie Consent Banner ============ */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 18px;
  background: #fff;
  color: var(--color-primary);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 32px 0 rgba(21, 56, 104, 0.16);
  padding: 26px 20px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 3000;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.23s, transform 0.25s;
  font-size: 0.97rem;
  gap: 16px;
}
.cookie-banner.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(60px);
}
.cookie-banner p {
  margin-bottom: 0.6em;
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.cookie-btn {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.12s, color 0.12s;
}
.cookie-btn.accept {
  background: var(--color-primary);
  color: #fff;
}
.cookie-btn.accept:hover {
  background: #162d51;
}
.cookie-btn.reject {
  background: var(--color-secondary);
  color: #fff;
}
.cookie-btn.reject:hover {
  background: #be361c;
}
.cookie-btn.settings {
  background: var(--color-accent);
  color: var(--color-primary);
}
.cookie-btn.settings:hover {
  background: #ffe299;
}

/* ==== Cookie settings Modal ==== */
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(21,56,104,0.28);
  z-index: 3100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s;
}
.cookie-modal-overlay.hide {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: 0 12px 48px 0 rgba(21,56,104,0.20);
  padding: 38px 20px 32px 26px;
  width: 100%;
  max-width: 410px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  margin: 22px;
}
.cookie-modal h2 {
  color: var(--color-primary);
  font-size: 1.5rem;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 0;
}
.cookie-category label {
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}
.cookie-switch {
  width: 36px;
  height: 22px;
  background: var(--color-gray);
  border-radius: 11px;
  position: relative;
  margin-right: 9px;
  transition: background 0.15s;
}
.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-switch span {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: var(--color-primary);
  border-radius: 50%;
  transition: left 0.15s, background 0.15s;
}
.cookie-switch input:checked + span {
  left: 17px;
  background: var(--color-secondary);
}
.cookie-category.essential label:after {
  content: "Siempre activo";
  color: var(--color-muted);
  font-size: 0.92rem;
  margin-left: 8px;
}
.cookie-modal-close {
  position: absolute;
  right: 18px;
  top: 16px;
  font-size: 2.1rem;
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
}
.cookie-modal-close:hover { color: var(--color-secondary); }
.cookie-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* ==== Responsive: Mobile First Layouts ==== */
@media (max-width: 991px) {
  .container {
    max-width: 98vw;
    padding-right: 10px;
    padding-left: 10px;
  }
  .team-list, .feature-grid, .card-container, .content-grid {
    flex-direction: column;
    gap: 20px;
  }
  .main-nav, .footer-nav, .feature-grid, .content-grid, .team-list, .card-container {
    gap: 18px;
  }
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}
@media (max-width: 768px) {
  .section, .about-section, .history-section, .benefits-section,
  .services-section, .audiences-section, .methodology-section,
  .schedule-section, .pricing-section, .faq-section, .team-section,
  .values-section, .confirmation-section, .contact-section, .milestones-section, .testimonials {
    padding: 20px 5px;
    margin-bottom: 36px;
  }
  h1, .h1 {
    font-size: 1.56rem;
  }
  h2, .h2 {
    font-size: 1.18rem;
  }
  .card, .team-member, .testimonial-card, .student-story {
    padding: 14px 9px;
  }
  .cookie-banner {
    font-size: 0.97rem;
    padding: 18px 9px 16px 11px;
  }
  .cookie-modal {
    padding: 16px 7px 18px 11px;
    max-width: 94vw;
  }
  .footer-logo img {
    width: 60px;
  }
}

/* Prevent content overlap and guarantee spacing everywhere */
.section, .about-section, .history-section, .benefits-section,
.services-section, .audiences-section, .methodology-section,
.schedule-section, .pricing-section, .faq-section, .team-section,
.values-section, .confirmation-section, .contact-section,
.milestones-section, .testimonials {
  margin-bottom: 60px;
}
.section > *, .about-section > *, .history-section > *, .services-section > *,
.audiences-section > *, .methodology-section > *, .schedule-section > *, .pricing-section > *, .faq-section > *, .cta-section > * {
  margin-bottom: 20px;
}
.section > *:last-child, .about-section > *:last-child, .history-section > *:last-child, .services-section > *:last-child,
.audiences-section > *:last-child, .methodology-section > *:last-child, .schedule-section > *:last-child, .pricing-section > *:last-child, .faq-section > *:last-child, .cta-section > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 500px) {
  .footer-logo img { width: 44px; }
  .footer-contact { font-size: 0.88rem }
}

/* Subtle Interactive Microinteractions */
.cta-button, .card, .feature-grid li, .testimonial-card, .student-story, .team-member, .cookie-btn {
  will-change: transform, box-shadow;
  transition: box-shadow 0.16s, transform 0.16s, background 0.16s, color 0.15s;
}

/* Hide default list marker on special lists */
ul.feature-grid, .feature-grid ul, .main-nav ul,
.footer-nav ul, .mobile-nav ul {
  list-style: none;
  margin-left: 0;
}

/* Accessibility: Focus Outline for Keyboard Users */
a:focus, button:focus, .cta-button:focus, .cookie-btn:focus, .cookie-modal-close:focus {
  outline: 2px dashed var(--color-accent) !important;
  outline-offset: 2px;
}

/* Table Scroll on Mobile */
@media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead { display: none; }
  td {
    position: relative;
    padding-left: 50%;
    font-size: 0.97rem;
    border-bottom: 1px solid #e6eaf0;
  }
  td:before {
    position: absolute;
    top: 12px;
    left: 16px;
    content: attr(data-label);
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    white-space: nowrap;
  }
}

/* Miscellaneous: Hero styles for Index page */
.hero {
  background: linear-gradient(90deg, #f6f7fa 40%, #dbe6fa 100%);
  min-height: 340px;
  display: flex;
  align-items: center;
  margin-bottom: 48px;
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero h1 {
  color: var(--color-primary);
  font-size: 2.5rem;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
}
.hero p {
  font-size: 1.22rem;
  color: var(--color-paragraph);
  margin-bottom: 18px;
}
@media (max-width: 768px) {
  .hero { min-height: 220px; padding-top: 18px; }
  .hero h1 { font-size: 1.4rem; }
  .hero p { font-size: 1rem; }
}

/* =============== END =============== */
