/* =========================
PYTHONIAMO "playful_dynamic" THEME - style.css
BRAND COLORS: #263238 (primary), #1976D2 (secondary), #FFD600 (accent)
FONTS: Montserrat (display), Roboto (body)
========================= */

/* --- CSS RESET & NORMALIZATION --- */
html { box-sizing: border-box; font-size: 16px; }
*, *::before, *::after { box-sizing: inherit; margin: 0; padding: 0; }
body { min-height: 100vh; font-family: 'Roboto', Arial, sans-serif; background: #F7FAFE; color: #263238; line-height: 1.7; }
img, svg { vertical-align: middle; max-width: 100%; height: auto; border: 0; }
a { color: #1976D2; text-decoration: none; transition: color 0.2s; }
a:focus { outline: 2px solid #FFD600; outline-offset: 2px; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; border: none; border-radius: 0; background: none; }

/* --- VARIABLES --- */
:root {
  --primary: #263238;
  --secondary: #1976D2;
  --accent: #FFD600;
  --bg-light: #F7FAFE;
  --bg-section: #FFF;
  --text-body: #263238;
  --text-secondary: #5C6BC0;
  --shadow-card: 0 2px 18px rgba(25, 118, 210, 0.07);
  --shadow-pop: 0 6px 24px rgba(255, 214, 0, 0.06);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --font-display: 'Montserrat', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

@media (max-width: 768px) {
  :root { font-size: 15px; }
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}
h1 { font-size: 2.5rem; line-height: 1.12; color: var(--secondary); }
h2 { font-size: 2rem;   line-height: 1.2; color: var(--primary); margin-bottom: 16px; }
h3 { font-size: 1.375rem; color: var(--primary); margin-bottom: 10px; }
h4 { font-size: 1.125rem; color: var(--primary); margin-bottom: 9px; }
p, li, dl, address { font-size: 1rem; font-family: var(--font-body); color: var(--text-body); margin-bottom: 16px; }
strong, b { font-weight: 600; }

/* Fun playful headers animation */
h1,h2 { animation: bounce-in 0.7s cubic-bezier(0.57,1.65,0.52,0.93); }
@keyframes bounce-in {
  0% { transform: scale(0.92) translateY(32px); opacity: 0; }
  60% { transform: scale(1.02) translateY(-7px); opacity: 1; }
  100% { transform: scale(1) translateY(0); }
}

/* --- CONTAINER AND SPACING PATTERNS --- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 18px;
  padding-right: 18px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--bg-section);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.content-wrapper {
  margin: 0 auto;
  max-width: 880px;
}

/* --- FLEXBOX LAYOUTS --- */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #FFF;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  position: relative;
  padding: 28px 20px;
}
.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;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: #FFF;
  box-shadow: var(--shadow-pop);
  margin-bottom: 20px;
  transition: transform 0.22s cubic-bezier(.35,1.18,.54,.99), box-shadow 0.22s;
}
.testimonial-card:hover {
  transform: scale(1.035) rotate(-1deg);
  box-shadow: 0 8px 36px rgba(25, 118, 210, 0.15);
  background: #FFD60010;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #FFF;
  border-radius: var(--radius-md);
  padding: 28px 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.19s, box-shadow 0.19s;
  position: relative;
}
.feature-item img {
  width: 40px;
  height: 40px;
}
.feature-item:hover {
  transform: translateY(-6px) scale(1.04) rotate(-1.5deg);
  box-shadow: 0 8px 28px rgba(25, 118, 210, 0.13);
}

/* --- PLAYFUL DYNAMIC ACCENTS --- */
.level-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  border-radius: 16px;
  font-size: 0.95rem;
  padding: 4.5px 16px 5px 16px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  transition: background 0.2s;
  box-shadow: 0 2px 12px rgba(255, 214, 0, 0.18);
}
.course-item, .course-feature {
  min-width: 240px;
  flex: 1 1 0px;
  background: #FFFDF7;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  padding: 22px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.18s, transform 0.18s;
}
.course-item:hover, .course-feature:hover {
  box-shadow: 0 8px 24px #FFD60040;
  transform: rotate(-0.5deg) scale(1.02);
}

/* --- FEATURE & COURSE GRIDS --- */
.feature-grid, .course-overview-list, .course-list-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
}
.feature-grid .feature-item,
.course-overview-list .course-item,
.course-list-grid .course-feature {
  flex: 1 1 220px;
  min-width: 220px;
  max-width: 100%;
}

@media (max-width: 900px) {
  .feature-grid, .course-overview-list, .course-list-grid {
    gap: 16px;
  }
}
@media (max-width: 768px) {
  .feature-grid, .course-overview-list, .course-list-grid {
    flex-direction: column;
  }
}

/* --- TESTIMONIAL CAROUSEL & GRID --- */
.testimonial-carousel, .testimonial-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
}
.testimonial-carousel .testimonial-card, .testimonial-grid .testimonial-card {
  flex: 1 1 250px;
  min-width: 250px;
  background: #FFF;
}
.before-after-stories {
  margin-top: 32px;
  padding: 22px 18px;
  background: #FFD60011;
  border-radius: var(--radius-md);
  box-shadow: 0 3px 14px #FFD60022;
}
.before-after-stories h3 {
  color: var(--secondary);
  font-size: 1.25rem;
  margin-bottom: 4px;
}

/* --- STARS FOR TESTIMONIALS --- */
.stars {
  letter-spacing: 0.08em;
  color: #FFD600;
  font-size: 1.25em;
  font-family: 'Montserrat', Arial, sans-serif;
  text-shadow: 1px 1px 0 #FFFFFF88;
}

/* --- BUTTONS --- */
.btn-primary {
  display: inline-block;
  background: linear-gradient(90deg, #FFD600 44%, #1976D2 100%);
  color: #263238;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.12rem;
  line-height: 1.25;
  padding: 12px 34px;
  border-radius: 32px;
  box-shadow: 0 2px 24px #FFD60022, 0 1.5px 12px #1976D233;
  letter-spacing: 0.06em;
  border: 2.5px solid #1976D2;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.20s, transform 0.20s, box-shadow 0.15s, color 0.25s;
  text-shadow: 0 2px 4px #FFF3;
  will-change: transform;
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(90deg, #1976D2 20%, #FFD600 90%);
  color: #FFF;
  transform: scale(1.035) rotate(-2deg);
  box-shadow: 0 6px 28px #1976D255;
}

.btn-secondary {
  display: inline-block;
  background: #1976D2;
  color: #FFF;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 24px;
  border-radius: 28px;
  border: 2px solid #FFD600;
  margin: 0 6px;
  transition: background 0.18s, color 0.18s, box-shadow 0.15s;
  cursor: pointer;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: #FFD600;
  color: #1976D2;
  box-shadow: 0 6px 28px #FFD60055;
}

/* --- HEADER & NAVIGATION --- */
header {
  background: #FFF;
  box-shadow: 0 2px 14px #1976D201;
  padding: 0;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 0 18px;
}
.main-nav a {
  padding: 6px 3px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: #1976D2;
  border-radius: 10px;
  transition: background 0.16s, color 0.19s;
}
.main-nav a:hover, .main-nav a:focus {
  background: #FFD60044;
  color: #263238;
}
.main-nav .btn-primary {
  margin-left: 10px;
}

/* --- MOBILE NAVIGATION --- */
.mobile-menu-toggle {
  display: none;
  background: var(--accent);
  color: var(--primary);
  font-size: 2.1rem;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  line-height: 44px;
  text-align: center;
  border: 2.5px solid #1976D2;
  box-shadow: 0 2px 16px #FFD60022;
  z-index: 109;
  margin-left: 20px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.13s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: #1976D2;
  color: #FFD600;
}

@media (max-width: 1024px) {
  .main-nav { gap: 0 10px; }
  .main-nav a { font-size: 0.97rem; }
}
@media (max-width: 900px) {
  .main-nav a { font-size: 0.9rem; }
}

@media (max-width: 850px) {
  .main-nav { gap: 0 8px; }
}
@media (max-width: 768px) {
  .main-nav { display: none !important; }
  .mobile-menu-toggle { display: inline-block; }
}

.mobile-menu {
  display: none;
  position: fixed;
  z-index: 1100;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(25, 118, 210, 0.96);
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(.33,1.3,.36,1), opacity 0.22s;
  opacity: 0;
}
.mobile-menu.open {
  display: block;
  transform: translateX(0);
  opacity: 1;
  animation: slidein 0.33s cubic-bezier(.55,1.06,.65,1.01);
}
@keyframes slidein {
  from { transform: translateX(-100%); opacity: 0.5; }
  to   { transform: translateX(0);     opacity: 1; }
}
.mobile-menu-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none;
  border: none;
  font-size: 2.4rem;
  color: var(--accent);
  z-index: 1111;
  cursor: pointer;
  transition: color 0.14s, transform 0.13s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: #FFF;
  transform: rotate(18deg) scale(1.09);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* Make sure links are touch targets */
  margin-top: 64px;
  gap: 20px;
  padding: 0 36px;
}
.mobile-nav a {
  color: #FFF;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.17rem;
  letter-spacing: 0.02em;
  padding: 12px 0;
  border-radius: 8px;
  width: 100%;
  transition: background 0.18s, color 0.18s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: #FFD60099;
  color: #263238;
}

/* --- HERO/CTA HIGHLIGHT --- */
.cta-highlight {
  background: #1976D2;
  color: #FFF;
  border-radius: var(--radius-lg);
  padding: 34px 24px;
  text-align: center;
  margin: 0 auto;
  box-shadow: 0 2px 28px #1976D255;
  animation: pop-cta .78s cubic-bezier(.15,1.35,.41,.97) both;
}
.cta-highlight h2 {
  color: #FFD600;
  font-size: 2.25rem;
}
.cta-highlight p { font-size: 1.18em; margin-bottom: 20px; color: #FFF6; }

@keyframes pop-cta {
  from { transform: scale(0.87) translateY(60px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  z-index: 1200;
  left: 0; bottom: 0; right: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  justify-content: center;
  background: #1976D2;
  color: #FFF;
  padding: 22px 24px;
  box-shadow: 0 -4px 28px #26323833, 0 3px 12px #FFD60022;
  font-size: 1.05rem;
  line-height: 1.7;
  transform: translateY(150%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.33s cubic-bezier(.45,1.6,.33,1), opacity 0.22s;
}
.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cookie-banner .btn-primary, .cookie-banner .btn-secondary {
  font-size: 1rem; font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  min-width: 105px;
}
.cookie-banner .btn-secondary {
  background: #FFF;
  color: #1976D2;
  border: 2px solid #FFD600;
  box-shadow: none;
}
.cookie-banner .btn-secondary:hover {
  background: #FFD600;
  color: #1976D2;
}

/* --- COOKIE MODAL --- */
.cookie-modal-overlay {
  display: none;
  position: fixed;
  z-index: 1300;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(25, 118, 210, 0.73);
  align-items: center;
  justify-content: center;
  animation: fadein-sm .24s cubic-bezier(.41,1.45,.33,1.19);
}
.cookie-modal-overlay.open {
  display: flex;
}
.cookie-modal {
  background: #FFF;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px #26323833, 0 3px 8px #FFD60018;
  max-width: 420px;
  width: 95%;
  padding: 34px 24px 25px 24px;
  color: var(--primary);
  position: relative;
  animation: drop-modal .33s cubic-bezier(.34,1.42,.36,1.07);
}
@keyframes fadein-sm { from { opacity: 0; } to { opacity: 1; } }
@keyframes drop-modal {
  from { transform: translateY(-38px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.cookie-modal .modal-close {
  position: absolute;
  right: 23px; top: 12px;
  font-size: 2rem;
  background: none;
  border: none;
  color: #5C6BC0;
  cursor: pointer;
  transition: color 0.16s, transform 0.11s;
}
.cookie-modal .modal-close:hover { color: #1976D2; transform: scale(1.15); }
.cookie-modal h3 {
  margin-bottom: 16px;
  font-size: 1.28rem;
  color: #1976D2;
}
.cookie-categories {
  margin: 15px 0 18px 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.cookie-categories .cookie-category {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 1.04em;
}
.cookie-categories input[type=checkbox] {
  width: 22px; height: 22px;
  accent-color: #FFD600;
  margin-right: 2px;
}
.cookie-category.essential {
  font-weight: 600;
  color: #1976D2;
}
.cookie-category.essential input[type=checkbox] {
  accent-color: #b8b8b8;
  cursor: not-allowed;
}
.cookie-modal .btn-primary, .cookie-modal .btn-secondary {
  font-size: 1rem; margin-top: 18px;
}

/* --- FAQ LIST --- */
.faq-list {
  margin-top: 18px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.faq-list dt {
  font-family: var(--font-display); font-weight: 700;
  color: #1976D2; font-size: 1.14rem;
  margin-bottom: 3px;
}
.faq-list dd {
  color: #212D3A; font-size: 1rem; margin-bottom: 7px;
}

/* --- NEWSLETTER SIGNUP --- */
.newsletter-signup {
  background: #FFD60024;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 24px;
}
.newsletter-signup p { margin-bottom: 10px; font-size: 1.07em; }
.newsletter-signup .btn-primary { margin-top: 0; }

.social-links img {
  width: 32px; height: 32px;
  margin-left: 5px;
  vertical-align: middle;
  background: #FFD60011;
  border-radius: 50%;
  transition: box-shadow 0.15s, background 0.15s;
}
.social-links a:hover img { background: #FFD60040; box-shadow: 0 3px 10px #FFD60033; }

/* --- CONTACT DETAILS --- */
.contact-details {
  background: #1976D2;
  color: #FFF;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: 0 2px 14px #1976D244;
}
.contact-details img { width: 22px; height: 22px; display: inline-block; margin-right: 9px; vertical-align: -6px; }
.map-embed {
  margin-top: 12px;
  background: #fff9e0;
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  font-size: 1.02em;
}

/* --- FOOTER --- */
footer {
  background: var(--primary);
  color: #FFD600;
  padding: 38px 0 24px 0;
  margin-top: 70px;
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 38px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand {
  flex: 1 1 180px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.footer-brand img { width: 64px; height: auto; }
.footer-nav {
  flex: 2 1 220px;
  min-width: 200px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.footer-nav a {
  color: #FFD600;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.93;
  padding: 1.5px 2.5px;
  margin-bottom: 3px;
  border-radius: 4px;
  transition: color 0.18s, background 0.18s;
}
.footer-nav a:hover {
  color: #1976D2;
  background: #FFD60055;
}
.footer-contact {
  flex: 1 1 220px;
  background-color: #b8b8b8;
  min-width: 200px;
  color: #FFD600;
  font-size: 1rem;
  line-height: 1.7;
}
.footer-contact h4 {
  font-size: 1.11rem;
  font-family: var(--font-display);
  color: #FFD600;
}
.footer-contact img { width: 19px; height: 19px; vertical-align: -5px; margin-right: 8px; }
.footer-legal {
  flex: 1 1 200px;
  min-width: 200px;
  color: #FFD600BB;
  margin-top: 5px;
  font-size: 0.98rem;
}
.footer-legal a {
  color: #FFD600BB;
  transition: color 0.15s;
}
.footer-legal a:hover { color: #FFF; }

@media (max-width: 1024px) {
  footer .container { flex-direction: column; gap: 28px 0; align-items: stretch; }
  .footer-nav { justify-content: flex-start; gap: 7px 15px; }
}
@media (max-width: 700px) {
  footer { padding: 32px 0 16px 0; }
  .footer-nav { flex-wrap: wrap; }
  .footer-brand img{ width: 55px; }
}

/* --- SECTION & CONTENT RESPONSIVENESS --- */
@media (max-width: 900px) {
  .section { padding: 28px 8px; }
  .content-wrapper { max-width: 98vw; }
}
@media (max-width: 768px) {
  .container { padding-left: 9px; padding-right: 9px; }
  .section { padding: 18px 2px; margin-bottom: 32px; }
  .content-wrapper { padding: 0 1.5vw; }
  .text-image-section { flex-direction: column; align-items: stretch; gap: 22px; }
  .testimonial-carousel, .testimonial-grid, .feature-grid, .course-overview-list, .course-list-grid {
    flex-direction: column;
    gap: 18px;
  }
}

/* --- MISCELLANEOUS ELEMENTS --- */
ul, ol { padding-left: 1.3em; margin-bottom: 1em; }
ul li, ol li { margin-bottom: 8px; }
ul li:last-child, ol li:last-child { margin-bottom: 0; }
dt { font-weight: bold; }
dd { margin-left: 1em; margin-bottom: 10px; }

/* Table Styling for Legal Pages */
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid #FFD60099; padding: 8px; }
th { background: #ffd6006a; color: #263238; }

/* --- FORM ELEMENTS --- */
input[type="text"], input[type="email"], input[type="password"], textarea {
  border: 1.7px solid #1976D2;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  width: 100%;
  margin-bottom: 10px;
  transition: border 0.16s, box-shadow 0.16s;
  font-size: 1rem;
  font-family: var(--font-body);
  background: #FFFBF7;
}
input:focus, textarea:focus {
  outline: none;
  border: 2px solid #FFD600;
  box-shadow: 0 2px 16px #FFD60033;
}
label { font-family: var(--font-display); font-size: 1.06rem; font-weight: 600; color: #1976D2; margin-bottom: 7px; display: block; }

/* --- ACCESSIBILITY COLOR CONTRASTS --- */
.section, .card, .feature-item, .testimonial-card, .course-item, .course-feature {
  color: #263238;
  background: #FFF;
}
.testimonial-card {
  background: #FFF;
  color: #263238;
}
.testimonial-card strong { color: #1976D2; font-family: var(--font-display); }

/* --- ANIMATED ICONS/ELEMENTS (playful) --- */
.feature-item img, .testimonial-card .stars {
  animation: swing-playful 1.7s cubic-bezier(.44,1.63,.53,1.17) infinite alternate;
}
@keyframes swing-playful {
  0% { transform: rotate(-4deg) scale(0.98); }
  100% { transform: rotate(4deg) scale(1.07); }
}

/* --- FORM VALIDATION (for playful feedback) --- */
input:invalid:not(:focus):not(:placeholder-shown), textarea:invalid:not(:focus):not(:placeholder-shown) {
  border-color: #F44336;
  background: #FFEFEF;
}

/* --- PRINT STYLES --- */
@media print {
  header, nav, .mobile-menu, .cookie-banner, .btn-primary, footer { display: none !important; }
  main, .container, .content-wrapper { width: 100vw !important; box-shadow: none !important; }
}

/* --- UTILITY HELPERS --- */
.mb-20 { margin-bottom: 20px !important; }
.mt-20 { margin-top: 20px !important; }
.text-center { text-align: center !important; }
.w-100 { width: 100% !important; }

/* --- Hide visually --- */
.sr-only {
  position: absolute;
  left: -2000px; top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ------------------------
END OF PYTHONIAMO STYLE.CSS
-------------------------- */