/* CSS RESET + BASE */
html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
}
body {
  background: #F5F2EB;
  color: #245463;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}
ul, ol {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s cubic-bezier(.4,0,.2,1);
}
button, .btn-primary, .btn-secondary {
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
button:focus, a:focus {
  outline: 2px solid #245463;
  outline-offset: 2px;
}

:root {
  --color-primary: #245463;
  --color-secondary: #97BCA5;
  --color-accent: #F5F2EB;
  --color-light: #FFFFFF;
  --color-text: #245463;
  --color-text-light: #6797A5;
  --color-neutral: #ECEAE3;
  --color-border: #dde4e0;
  --shadow-default: 0 2px 16px 0 rgba(36,84,99,0.07);
  --shadow-card: 0 4px 24px 0 rgba(36,84,99,0.10);
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary);
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 600;
  margin-bottom: 0.7em;
  line-height: 1.1;
}
h1 {
  font-size: 2.5rem;
  letter-spacing: -1px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 0.5em;
}
h3 {
  font-size: 1.4rem;
  margin-bottom: 0.3em;
}
h4, h5, h6 {
  font-size: 1.125rem;
  margin-bottom: 0.2em;
}
p, ul, ol {
  color: var(--color-text);
  font-size: 1rem;
  margin-bottom: 1.2em;
}
strong {
  font-weight: 600;
}

/* CONTAINER & SECTION SPACING */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.text-section {
  max-width: 720px;
  margin: 0 auto;
}

/* FLEX LAYOUTS AS PER MANDATE (FLEXBOX ONLY) */
.card-container, .corsi-grid, .team-grid, .feature-grid, .content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: stretch;
}
.card {
  background: var(--color-light);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 32px 24px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  position: relative;
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--color-light);
  border-radius: 16px;
  box-shadow: var(--shadow-default);
  padding: 20px 28px;
  margin-bottom: 20px;
  min-width: 240px;
  max-width: 390px;
}
.testimonial-slider {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

/* HERO SECTION */
.hero {
  padding: 60px 0 40px 0;
  background: var(--color-accent);
  border-radius: 0 0 36px 36px;
  box-shadow: 0 3px 16px rgba(36,84,99,0.06);
  margin-bottom: 60px;
}
.hero .content-wrapper {
  align-items: flex-start;
  gap: 12px;
  max-width: 640px;
}
.hero h1 {
  color: var(--color-primary);
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 0.5em;
}
@media (max-width: 768px) {
  .hero {
    padding: 40px 0 20px 0;
    border-radius: 0 0 18px 18px;
    margin-bottom: 40px;
  }
  .hero .content-wrapper {
    padding: 0;
    width: 100%;
    max-width: 100%;
  }
}

/* NAVIGATION HEADER */
header {
  width: 100%;
  background: var(--color-light);
  box-shadow: 0 1px 8px 0 rgba(36,84,99,0.03);
  position: relative;
  z-index: 100;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav a {
  color: var(--color-primary);
  font-weight: 500;
  font-size: 1rem;
  opacity: 0.88;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.18s, color 0.18s;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--color-secondary);
  color: #fff;
  opacity: 1;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-light);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 12px 32px;
  border: none;
  box-shadow: 0 2px 12px rgba(36,84,99,0.05);
  border-radius: 8px;
  letter-spacing: .05em;
  transition: background 0.16s, transform 0.13s;
  margin-left: 14px;
  display: inline-block;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
  transform: translateY(-2px) scale(1.03);
}

.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-light);
  font-size: 1rem;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 0.5em;
  transition: background 0.18s, color 0.18s, transform 0.13s;
  display: inline-block;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--color-primary);
  color: var(--color-light);
  transform: translateY(-1px) scale(1.02);
}

/* HAMBURGER MENU BUTTON */
.mobile-menu-toggle {
  display: none;
  background: var(--color-primary);
  color: var(--color-light);
  border: none;
  border-radius: 8px;
  font-size: 2.1rem;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: absolute;
  top: 14px;
  right: 20px;
  z-index: 420;
  transition: background 0.16s;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: var(--color-secondary);
  color: var(--color-primary);
}

/* MOBILE MENU */
.mobile-menu {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-light);
  box-shadow: 0 0 32px 8px rgba(36,84,99,0.10);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: flex-start;
  padding: 18px 32px;
  gap: 28px;
  transform: translateX(-110vw);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(.74,0,.21,1), opacity 0.22s cubic-bezier(.74,0,.21,1);
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}
.mobile-menu-close {
  align-self: flex-end;
  background: none;
  color: var(--color-primary);
  font-size: 2.2rem;
  border: none;
  cursor: pointer;
  margin-bottom: 18px;
  transition: color 0.16s;
}
.mobile-menu-close:focus,
.mobile-menu-close:hover {
  color: var(--color-secondary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}
.mobile-nav a {
  font-size: 1.2rem;
  color: var(--color-primary);
  padding: 8px 2px;
  border-radius: 5px;
  font-weight: 600;
  transition: color 0.14s, background 0.14s;
}
.mobile-nav a:focus, .mobile-nav a:hover {
  background: var(--color-secondary);
  color: var(--color-light);
}

@media (max-width: 1100px) {
  .container {
    max-width: 940px;
  }
}
@media (max-width: 950px) {
  .container {
    max-width: 99vw;
  }
}
@media (max-width: 900px) {
  .main-nav {
    gap: 14px;
  }
}
@media (max-width: 768px) {
  header .container {
    padding: 12px 10px 12px 10px;
    gap: 10px;
  }
  .main-nav,
  .btn-primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .mobile-menu {
    display: flex;
  }
}

/* FEATURE GRID / TEAM GRID / CORSI GRID */
.feature-grid,
.team-grid,
.corsi-grid {
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: stretch;
}
.feature-grid li, .staff-member, .corso-item {
  flex: 1 1 250px;
  background: var(--color-light);
  border-radius: 12px;
  box-shadow: var(--shadow-default);
  padding: 28px 24px 20px 24px;
  margin-bottom: 20px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-grid img, .feature-grid svg {
  width: 44px;
  height: 44px;
  margin-bottom: 5px;
}
.corso-item .level {
  font-size: 0.97rem;
  color: var(--color-secondary);
  background: var(--color-neutral);
  padding: 2px 10px;
  border-radius: 6px;
  margin-top: 6px;
  display: inline-block;
}
.staff-member .qualification {
  font-size: 0.95rem;
  color: var(--color-secondary);
  margin-top: 8px;
}

@media (max-width: 768px) {
  .feature-grid,
  .team-grid,
  .corsi-grid {
    gap: 14px;
  }
  .feature-grid li, .staff-member, .corso-item {
    min-width: 160px;
    padding: 18px 12px;
  }
}

/* COURSE & SCHEDULE TABLES */
.schedule-table, .membership-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-light);
  border-radius: 14px;
  box-shadow: var(--shadow-default);
  margin-bottom: 24px;
  overflow: hidden;
}
.schedule-table th, .schedule-table td,
.membership-table th, .membership-table td {
  padding: 14px 10px;
  text-align: left;
  font-size: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.schedule-table thead, .membership-table thead {
  background: var(--color-neutral);
}
.schedule-table tr:last-child td,
.membership-table tr:last-child td {
  border-bottom: none;
}
.availability-labels {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
}
.label-available, .label-recovery {
  font-size: 0.92rem;
  background: var(--color-secondary);
  color: var(--color-light);
  padding: 5px 16px;
  border-radius: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.label-recovery {
  background: var(--color-primary);
  color: var(--color-light);
}
@media (max-width: 768px) {
  .schedule-table th, .schedule-table td,
  .membership-table th, .membership-table td {
    padding: 9px 5px;
    font-size: 0.93rem;
  }
  .availability-labels {
    flex-direction: column;
    gap: 8px;
  }
}

/* FAQ ACCORDION (no interaction - just styling) */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 18px;
}
.faq-item {
  background: var(--color-accent);
  border-radius: 8px;
  padding: 18px 18px 8px 18px;
  box-shadow: var(--shadow-default);
}
.faq-item h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--color-primary);
}

/* EVENT LIST */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.event-list li {
  background: var(--color-light);
  border-radius: 10px;
  padding: 22px 20px 18px 20px;
  box-shadow: var(--shadow-default);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.event-register-link {
  background: var(--color-secondary);
  color: var(--color-light);
  font-size: 1rem;
  padding: 8px 24px;
  border-radius: 8px;
  align-self: flex-start;
  font-weight: 600;
  margin-top: 5px;
  transition: background 0.12s, color 0.12s;
}
.event-register-link:hover, .event-register-link:focus {
  background: var(--color-primary);
}

/* CARDS, CONTENT GRIDS */
.card, .content-grid > * {
  margin-bottom: 20px;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

/* Testimonials */
.testimonial-card {
  align-items: flex-start;
  background: var(--color-light);
  color: var(--color-primary);
  max-width: 370px;
  padding: 26px 30px 22px 26px;
  border-left: 7px solid var(--color-secondary);
  position: relative;
}
.testimonial-card p {
  font-size: 1.18rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}
.testimonial-info {
  font-size: 0.99rem;
  color: var(--color-secondary);
  margin-bottom: 0.7em;
}
.stars {
  display: flex;
  gap: 3px;
}
.stars img {
  filter: drop-shadow(0 1px 2px #ececec);
  width: 24px;
  height: 24px;
}
@media (max-width: 768px) {
  .testimonial-slider {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  .testimonial-card {
    max-width: 100%;
    padding: 20px 12px;
  }
}

/* CONTACT & FOOTER */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.footer-nav a {
  font-size: 1rem;
  color: var(--color-secondary);
  opacity: .88;
  border-radius: 5px;
  transition: background 0.13s, color 0.14s;
  padding: 2px 8px;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--color-primary);
  background: var(--color-neutral);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.98rem;
  margin-bottom: 15px;
}
.footer-contact p {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-contact img {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}
.footer-logo {
  margin-top: 8px;
}
footer {
  background: var(--color-accent);
  width: 100%;
  padding: 38px 0 18px 0;
  border-radius: 32px 32px 0 0;
  margin-top: 50px;
  box-shadow: 0 -2px 12px rgba(36,84,99,0.05);
}
footer .container {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

/* Contact Map Placeholder */
.map-placeholder {
  background: var(--color-light);
  border-radius: 10px;
  padding: 16px 14px;
  color: var(--color-secondary);
  margin-top: 14px;
  font-style: italic;
  box-shadow: 0 2px 8px #ecf3ec;
}

/**** COOKIE CONSENT BANNER ****/
#cookie-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  background: var(--color-light);
  color: var(--color-primary);
  border-top: 2px solid var(--color-border);
  box-shadow: 0 -2px 16px 0 rgba(36,84,99,0.10);
  z-index: 11000;
  width: 100vw;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  gap: 22px;
  font-size: 1rem;
  transition: transform 0.3s cubic-bezier(.62,.06,.71,.99), opacity 0.23s;
}
#cookie-banner.hide {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
#cookie-banner .cookie-message {
  flex: 1 1 300px;
  max-width: 600px;
  color: var(--color-primary);
}
#cookie-banner .cookie-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}
.cookie-btn {
  font-size: 1rem;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  background: var(--color-secondary);
  color: var(--color-light);
  border: none;
  transition: background 0.16s, color 0.16s;
  margin-right: 2px;
}
.cookie-btn.accept {
  background: var(--color-primary);
  color: var(--color-light);
}
.cookie-btn.accept:hover, .cookie-btn.accept:focus {
  background: #15404f;
}
.cookie-btn.reject {
  background: #b2b2b2;
  color: var(--color-primary);
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: #a2a2a2;
}
.cookie-btn.settings {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: #eceae3;
}
@media (max-width: 600px) {
  #cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 16px 6px;
    gap: 13px;
  }
  #cookie-banner .cookie-actions {
    flex-wrap: wrap;
    gap: 9px;
  }
}

/* COOKIE PREFERENCES MODAL */
#cookie-modal {
  display: none;
  position: fixed;
  left: 0; top: 0; bottom: 0; right: 0;
  z-index: 12000;
  background: rgba(36,84,99,0.18);
  align-items: center;
  justify-content: center;
}
#cookie-modal.open {
  display: flex;
}
.cookie-modal-content {
  background: var(--color-light);
  box-shadow: 0 6px 32px 0 rgba(36,84,99,0.14);
  border-radius: 18px;
  max-width: 420px;
  width: 96vw;
  padding: 30px 28px 26px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: modalShow 0.34s cubic-bezier(.63,0,.36,1);
}
@keyframes modalShow {
  0% { opacity:0; transform:translateY(30px); }
  100% { opacity:1; transform:translateY(0); }
}

.cookie-modal-content h2 {
  color: var(--color-primary);
  font-size: 1.2rem;
  margin-bottom: 0.6em;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  background: var(--color-neutral);
  padding: 13px 14px;
  font-size: 1rem;
}
.cookie-category.essential {
  font-weight: 600;
  color: var(--color-primary);
  background: #CBD9D4;
}
.cookie-category label {
  font-size: 1rem;
  cursor: pointer;
}
.cookie-toggle {
  width: 38px;
  height: 22px;
  border-radius: 12px;
  background: #c6c6c6;
  position: relative;
  display: inline-block;
  transition: background 0.18s;
}
.cookie-toggle input[type="checkbox"] {
  display: none;
}
.cookie-toggle span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--color-primary);
  border-radius: 50%;
  transition: left 0.2s cubic-bezier(.33,.89,.56,1.24);
}
.cookie-toggle input[type="checkbox"]:checked + span {
  left: 18px;
  background: var(--color-secondary);
}
.cookie-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.cookie-modal-close {
  position: absolute;
  right: 18px;
  top: 12px;
  background: none;
  border: none;
  font-size: 1.7rem;
  color: var(--color-secondary);
  cursor: pointer;
  transition: color 0.13s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: var(--color-primary);
}

/* BUTTON STYLES (REINFORCED) */
.btn-primary, .btn-secondary, .event-register-link, .cookie-btn {
  box-shadow: 0 2px 12px rgba(36,84,99,0.06);
  border: none;
  cursor: pointer;
}
.btn-primary:active, .btn-secondary:active {
  transform: scale(0.97);
}
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.cookie-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* MICROINTERACTIONS */
.card, .testimonial-card, .staff-member, .corso-item, .feature-grid li, .event-list li, .faq-item {
  transition: box-shadow 0.18s, transform 0.17s;
}
.card:hover, .testimonial-card:hover, .staff-member:hover, .corso-item:hover, .feature-grid li:hover, .event-list li:hover, .faq-item:hover {
  box-shadow: 0 8px 32px 0 rgba(36,84,99,0.17);
  transform: translateY(-2px);
}

/* RESPONSIVE: flex column for text-image / grids on mobile */
@media (max-width: 768px) {
  .text-image-section, .content-grid {
    flex-direction: column;
    gap: 18px;
  }
  .card-container, .feature-grid, .team-grid, .corsi-grid {
    flex-direction: column;
    gap: 14px;
  }
}

/* OTHER CONTENT STYLING */
ul.course-list {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
ul.course-list li {
  font-size: 1rem;
  color: var(--color-primary);
  padding-left: 18px;
  position: relative;
  margin-bottom: 4px;
}
ul.course-list li:before {
  content: '\2022';
  color: var(--color-secondary);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  position: absolute;
  left: 0;
}
.session-types ul {
  margin-left: 0;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.next-steps ul {
  margin-left: 0;
  padding-left: 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.next-steps ul li:before {
  content: '\261E';
  color: var(--color-secondary);
  margin-right: 5px;
}

/* Utility for proper spacing between all cards */
.card, .feature-grid li, .team-grid > *, .corsi-grid > *, .event-list > li, .testimonial-card {
  margin-bottom: 20px !important;
}

/* Prevent absolute for normal content, but logo/close is OK */

/* VISUAL HIERARCHY for sections */
main > section {
  margin-bottom: 60px !important;
  padding: 40px 0;
}
main > section:last-child {
  margin-bottom: 0;
}

/* ACCESSIBILITY and FOCUS */
a:focus-visible, button:focus-visible, .main-nav a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  background: var(--color-neutral);
}

/* SCROLLBARS - minimal style for cleanliness */
::-webkit-scrollbar {
  width: 7px;
  background: var(--color-accent);
}
::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border-radius: 6px;
}

/* PRINT STYLES (hide navigation/footers) */
@media print {
  header, footer, #cookie-banner, #cookie-modal {
    display: none !important;
  }
}
