/* =============================================
   GLORYBER'S SPANISH ACADEMY — Shared Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --red: #E63946;
  --yellow: #FFD166;
  --blue: #118AB2;
  --green: #06D6A0;
  --purple: #A855F7;
  --orange: #FF6B35;
  --white: #FFFDF7;
  --dark: #1A1A2E;
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--white);
  color: var(--dark);
  overflow-x: hidden;
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--white);
  box-shadow: 0 3px 20px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 1000;
}

.nav-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  color: var(--red);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.nav-logo span { color: var(--blue); }
.nav-logo em { color: var(--green); font-style: normal; }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--dark);
  padding: 8px 12px;
  border-radius: 50px;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active { background: var(--yellow); color: var(--dark); }

.nav-cta {
  background: var(--red) !important;
  color: white !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.nav-cta:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(230,57,70,0.4) !important;
  background: var(--red) !important;
}

/* ===== PAGE HEADER (for inner pages) ===== */
.page-header {
  padding-top: var(--nav-h);
  padding-bottom: 70px;
  padding-left: 40px;
  padding-right: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #FFF9E6 0%, #E8F8FF 50%, #FFF0F1 100%);
  z-index: 0;
}

.page-header-content {
  position: relative;
  z-index: 1;
  padding-top: 60px;
}

.page-header-content .section-tag {
  margin-bottom: 16px;
}

.page-header h1 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--dark);
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 1.1rem;
  color: #666;
  font-weight: 600;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== SHARED SECTION STYLES ===== */
.section-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
}

.section-tag {
  display: inline-block;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.tag-red    { background: #FFE8EA; color: var(--red); }
.tag-blue   { background: #E0F4FF; color: var(--blue); }
.tag-green  { background: #D4FFF5; color: #048A6E; }
.tag-orange { background: #FFE8DC; color: var(--orange); }
.tag-purple { background: #F3E8FF; color: var(--purple); }
.tag-yellow { background: #FFF5CC; color: #8A6800; }

h2.section-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--dark);
}

.section-desc {
  font-size: 1.05rem;
  color: #666;
  line-height: 1.7;
  max-width: 580px;
  font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-3px); }

.btn-primary {
  background: var(--red);
  color: white;
  box-shadow: 0 8px 25px rgba(230,57,70,0.35);
}
.btn-primary:hover { box-shadow: 0 12px 35px rgba(230,57,70,0.5); }

.btn-secondary {
  background: var(--yellow);
  color: var(--dark);
  box-shadow: 0 8px 25px rgba(255,209,102,0.4);
}
.btn-secondary:hover { box-shadow: 0 12px 35px rgba(255,209,102,0.6); }

.btn-blue {
  background: var(--blue);
  color: white;
  box-shadow: 0 8px 25px rgba(17,138,178,0.35);
}
.btn-blue:hover { box-shadow: 0 12px 35px rgba(17,138,178,0.5); }

/* ===== FOOTER ===== */
footer {
  background: var(--dark);
  color: white;
  padding: 60px 40px 30px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 30px;
}

.footer-brand {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  color: var(--yellow);
  margin-bottom: 16px;
}
.footer-brand span { color: #60C8FF; }

.footer-desc {
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.footer-col h4 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  color: white;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--yellow); }

.footer-bottom {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  font-weight: 600;
}
.footer-bottom span { color: var(--yellow); }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== FLOATING SHAPES ===== */
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 30px; }
  .section-wrap { padding: 60px 24px; }
  .page-header { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; }
  .section-wrap { padding: 50px 20px; }
}

/* =============================================
   MOBILE NAVIGATION — Hamburger Menu
   ============================================= */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
  z-index: 1100;
}

.hamburger:hover { background: #F5F5F5; }

.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--dark);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* MOBILE MENU SLIDE-IN */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: var(--white);
  z-index: 2000;
  padding: 28px 28px 40px;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,0.15);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-menu.open { right: 0; }

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-close {
  align-self: flex-end;
  background: #F5F5F5;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.mobile-menu-close:hover { background: #E5E5E5; }

.mobile-menu-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  color: var(--red);
  margin-bottom: 32px;
  line-height: 1.2;
}
.mobile-menu-logo span { color: var(--blue); }

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.mobile-nav-links li a {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
  transition: background 0.2s;
}

.mobile-nav-links li a:hover,
.mobile-nav-links li a.active { background: var(--yellow); }

.mobile-nav-links li a.mobile-cta {
  background: var(--red);
  color: white;
  margin-top: 12px;
  text-align: center;
  font-size: 1.05rem;
}
.mobile-nav-links li a.mobile-cta:hover { background: #C62D39; }

.mobile-menu-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid #EEE;
  margin-top: 12px;
}
.mobile-menu-contact a,
.mobile-menu-contact span {
  font-size: 0.88rem;
  font-weight: 700;
  color: #888;
  text-decoration: none;
}
.mobile-menu-contact a { color: var(--blue); }

/* =============================================
   GLOBAL MOBILE RESPONSIVE IMPROVEMENTS
   ============================================= */

@media (max-width: 900px) {
  /* Show hamburger, hide desktop nav */
  .hamburger { display: flex; }
  .nav-links  { display: none !important; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 30px; }

  /* Sections */
  .section-wrap { padding: 60px 24px; }
  .page-header  { padding: 100px 24px 60px; }
}

@media (max-width: 600px) {
  /* Nav */
  nav { padding: 0 16px; }
  .nav-logo { font-size: 1.2rem; }

  /* Footer */
  .footer-top     { grid-template-columns: 1fr; gap: 28px; }
  footer          { padding: 50px 20px 24px; }
  .footer-brand   { font-size: 1.4rem; }

  /* Sections */
  .section-wrap  { padding: 50px 16px; }
  .page-header   { padding: 90px 16px 50px; }
  .page-header h1 { font-size: 2rem; }
  .page-header p  { font-size: 0.95rem; }

  /* Section titles */
  h2.section-title { font-size: 1.8rem; }
  .section-desc    { font-size: 0.95rem; }

  /* Buttons */
  .btn { padding: 12px 24px; font-size: 0.9rem; }

  /* Stats strip */
  .stats-strip { gap: 20px; padding: 20px 16px; flex-wrap: wrap; justify-content: center; }

  /* Slogan banner */
  .slogan-banner   { padding: 50px 20px; }
  .slogan-text     { font-size: 1.5rem; }

  /* Photo feature */
  .photo-feature        { padding: 60px 16px; }
  .photo-feature-inner  { grid-template-columns: 1fr; gap: 40px; }
  .photo-feature-images { order: -1; }
  .photo-stack          { height: 280px; }
  .photo-main           { width: 88%; height: 230px; }
  .photo-accent         { width: 58%; height: 160px; }
  .photo-badge          { font-size: 0.85rem; padding: 8px 14px; }

  /* Why cards */
  .why-grid { grid-template-columns: 1fr; gap: 16px; }
  .why-card { padding: 24px 20px; }
   /* Card Container */
.why-card {
    background-color: transparent;
    perspective: 1000px; /* Essential for 3D effect [2] */
    cursor: pointer;
}

/* 3D Inner Wrapper */
.why-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d; /* Required for 3D [2] */
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}

/* Hover Effect */
.why-card:hover .why-card-inner {
    transform: rotateY(180deg);
}

/* Front & Back Styling */
.why-card-front, .why-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Hide back face during flip [3] */
    backface-visibility: hidden;
    padding: 20px;
    box-sizing: border-box;
}

/* Style for Back Side */
.why-card-back {
    transform: rotateY(180deg);
}

  /* Testimonials */
  .testimonials-section { padding: 60px 16px; }
  .testimonials-grid    { grid-template-columns: 1fr; gap: 20px; }
  .testimonial-card     { padding: 24px 20px; }

  /* CTA */
  .cta-banner { padding: 60px 20px; }
}

/* =============================================
   CUSTOM PAINTBRUSH CURSOR
   ============================================= */

* { cursor: none !important; }

.custom-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  top: 0; left: 0;
  transform: translate(-4px, -28px);
  font-size: 1.6rem;
  transition: transform 0.08s ease, filter 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  line-height: 1;
  user-select: none;
  will-change: transform;
}

.custom-cursor.clicking {
  transform: translate(-4px, -28px) rotate(30deg) scale(0.85);
  filter: drop-shadow(0 4px 8px rgba(230,57,70,0.5));
}

/* Paint splat particle on click */
.paint-splat {
  position: fixed;
  pointer-events: none;
  z-index: 99998;
  font-size: 1.1rem;
  animation: splat 0.6s ease forwards;
  user-select: none;
  line-height: 1;
}

@keyframes splat {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.3); }
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  * { cursor: auto !important; }
  .custom-cursor { display: none; }
}

/* ===== EN ESPAÑOL NAV BUTTON ===== */
.nav-esp {
  background: linear-gradient(135deg, #E63946, #FF6B35) !important;
  color: white !important;
  border-radius: 50px;
  font-weight: 800 !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.nav-esp:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(230,57,70,0.4) !important;
  background: linear-gradient(135deg, #E63946, #FF6B35) !important;
  color: white !important;
}

/* ===== FLOATING PHOTO ANIMATION ===== */
@keyframes floatBob {
  0%   { transform: translateY(0px) rotate(-1deg); }
  50%  { transform: translateY(-12px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(-1deg); }
}

.float-photo {
  animation: floatBob 4s ease-in-out infinite;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  display: block;
  max-width: 100%;
}

.float-photo:nth-child(2) { animation-delay: 0.5s; }
.float-photo:nth-child(3) { animation-delay: 1s; }
.float-photo:nth-child(4) { animation-delay: 1.5s; }

.float-photo-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  align-items: center;
  padding: 60px 40px;
}

.float-photo-wrap img {
  width: 260px;
  height: 300px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: floatBob 4s ease-in-out infinite;
}

.float-photo-wrap img:nth-child(1) { animation-delay: 0s;    animation-duration: 4.0s; }
.float-photo-wrap img:nth-child(2) { animation-delay: 0.6s;  animation-duration: 4.4s; }
.float-photo-wrap img:nth-child(3) { animation-delay: 1.2s;  animation-duration: 3.8s; }
.float-photo-wrap img:nth-child(4) { animation-delay: 1.8s;  animation-duration: 4.2s; }

.float-section {
  background: linear-gradient(135deg, #FFF9E6, #E8F8FF);
  padding: 60px 40px;
  text-align: center;
}

.float-section h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 8px;
}

.float-section p {
  color: #666;
  font-weight: 600;
  margin-bottom: 40px;
}

@media (max-width: 600px) {
  .float-photo-wrap img { width: 140px; height: 170px; }
  .float-photo-wrap { gap: 16px; padding: 40px 16px; }
}
