:root {
  --bg: #ffffff;
  --bg-elev: #151821;
  --text: #11161f;
  --muted: #6b7280;
  --accent: #003cff;
  --border: #e5e7eb;
  --nav-h: 44px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Mozilla Text', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans,
    Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  padding-top: calc(var(--nav-h) + 40px); /* compensa navbar fixa mobile */
}

/* Mobile-first: Desktop body padding */
@media (min-width: 768px) {
  body {
    padding-top: var(--nav-h); /* compensa navbar fixa desktop */
  }
}

/* Hide content until everything is loaded */
body.loading {
  overflow: hidden;
}
body.loading .container {
  opacity: 0;
  transition: opacity 0.3s ease;
}
body.loaded .container {
  opacity: 1;
}

/* Loading spinner (optional) */
.loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 1000;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

body.loaded .loading-spinner {
  display: none;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

/* Mobile-first: Desktop styles */
@media (min-width: 768px) {
  .container {
    max-width: 1100px;
  }
}

/* Navbar - Mobile first */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg);
  min-height: var(--nav-h);
}

.navbar nav.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  min-height: var(--nav-h);
}

/* Mobile-first: Desktop navbar */
@media (min-width: 768px) {
  .navbar {
    height: var(--nav-h);
  }
  .navbar nav.container {
    flex-direction: row;
    justify-content: space-between;
    height: var(--nav-h);
    padding: 0;
  }
}

.menu {
  list-style: none !important;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* Mobile-first: Desktop navbar */
@media (min-width: 768px) {
  .menu {
    gap: 20px;
  }
}

.menu > li { position: relative; display: inline-flex; align-items: center; height: var(--nav-h); }

.menu a,
.menu a:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-h);
  padding: 0 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 300;
  letter-spacing: 0.4px;
  min-width: 60px;
  text-align: center;
  font-size: 12px;
}

/* Mobile-first: Desktop menu links */
@media (min-width: 768px) {
  .menu a,
  .menu a:visited {
    padding: 0 10px;
    min-width: 80px;
    font-size: 14px;
  }
}

.menu a:hover { color: var(--accent); }

/* Larguras fixas para manter posição estável - Mobile */
.menu li:nth-child(1) a { min-width: 50px; } /* AULAS/CLASSES */
.menu li:nth-child(2) a { min-width: 60px; } /* HORÁRIO/SCHEDULE */
.menu li:nth-child(3) a { min-width: 70px; } /* SOBRE NÓS/ABOUT US */
.menu li:nth-child(4) a { min-width: 80px; } /* VISITANTES/VISITORS */

/* Mobile-first: Desktop menu widths */
@media (min-width: 768px) {
  .menu li:nth-child(1) a { min-width: 70px; } /* AULAS/CLASSES */
  .menu li:nth-child(2) a { min-width: 90px; } /* HORÁRIO/SCHEDULE */
  .menu li:nth-child(3) a { min-width: 100px; } /* SOBRE NÓS/ABOUT US */
  .menu li:nth-child(4) a { min-width: 100px; } /* VISITANTES/VISITORS */
}

/* Dropdown */
.has-dropdown:hover > .dropdown { display: block; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.dropdown li { list-style: none; }
.dropdown a,
.dropdown a:visited { color: var(--text); }
.dropdown a:hover { background: #f3f4f6; }

/* Logo e Language Selector - Mobile first */
.logo-section { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  margin-top: 8px;
}

/* Mobile-first: Desktop logo section */
@media (min-width: 768px) {
  .logo-section { 
    height: var(--nav-h); 
    margin-top: 0;
  }
}

.logo { display: inline-flex; align-items: center; }
.logo img { height: calc(var(--nav-h) - 14px); width: auto; display: block; }

.language-selector {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Mozilla Text', sans-serif;
}

.language-selector button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Hide current language text on mobile, show only arrow */
.language-selector button #current-lang {
  display: none !important;
}

/* Mobile-first: Desktop language selector */
@media (min-width: 768px) {
  .logo-section .language-selector {
    display: block !important;
    margin-left: 15px;
  }
  
  .language-selector button #current-lang {
    display: inline !important;
  }
  
  .language-selector button .arrow {
    display: none !important;
  }
}

.language-selector button:hover {
  background: #f3f4f6;
}

.language-selector .arrow {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.language-selector.open .arrow {
  transform: rotate(180deg);
}

.language-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 4px 0;
  min-width: 60px;
  z-index: 100;
}

.language-dropdown.show {
  display: block;
}

.language-dropdown button {
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  border-radius: 0;
  color: var(--text);
  font-size: 14px;
}

.language-dropdown button:hover {
  background: #f3f4f6;
  color: var(--accent);
}

.language-dropdown button.active {
  color: var(--accent);
  background: #f8f9ff;
}

/* Page - Mobile first */
main { padding: 20px 0; }
.hero {
  padding: 30px 0 50px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: 28px;
}
.hero p { color: var(--muted); font-size: 16px; }

/* Mobile-first: Desktop page styles */
@media (min-width: 768px) {
  main { padding: 40px 0; }
  .hero {
    padding: 60px 0 100px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .hero p { font-size: 18px; }
}

.section { padding: 20px 0; }
.section h2 { margin-top: 0; }

/* Sobre Nós - galeria mobile first */
.about-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}
.about-gallery img:first-child {
  max-width: 100%;
  width: 100%;
  height: 250px;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.about-gallery .bottom-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  width: 100%;
  max-width: 100%;
}
.about-gallery .bottom-row img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Mobile-first: Desktop gallery */
@media (min-width: 768px) {
  .about-gallery {
    gap: 15px;
    margin: 15px 0;
  }
  .about-gallery img:first-child {
    max-width: 900px;
    height: 500px;
  }
  .about-gallery .bottom-row {
    flex-direction: row;
    gap: 15px;
    max-width: 900px;
  }
  .about-gallery .bottom-row img {
    flex: 1;
    height: 600px;
  }
}

/* Imagem única (página visitantes) - Mobile first */
.about-gallery img:only-child {
  max-width: 100%;
  width: 100%;
  height: 250px;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Mobile-only image - same format as other pages */
.about-gallery .mobile-only {
  max-width: 100%;
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center 70%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Mobile-first: Desktop single image */
@media (min-width: 768px) {
  .about-gallery img:only-child {
    max-width: 950px;
    height: 600px;
  }
}

/* Mobile/Desktop visibility classes */
.mobile-only {
  display: block;
}

.desktop-only {
  display: none;
}

/* Mobile-first: Desktop visibility */
@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }
  
  .desktop-only {
    display: block;
  }
}
.about-text {
  margin-top: 16px;
  text-align: justify;
  color: var(--muted);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  line-height: 1.6;
  font-size: 14px;
}

/* Mobile-first: Desktop text */
@media (min-width: 768px) {
  .about-text {
    max-width: 950px;
    font-size: 16px;
  }
}

/* Classes text boxes - Mobile first */
.classes-text-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.class-text-box {
  width: 100%;
  padding: 15px;
  text-align: justify;
}

/* Mobile-first: Desktop classes layout */
@media (min-width: 768px) {
  .classes-text-container {
    flex-direction: row;
    max-width: 950px;
  }
  .class-text-box {
    flex: 1;
    max-width: calc(50% - 7.5px);
    padding: 20px;
  }
}

.class-text-box h3 {
  margin: 0 0 12px 0;
  color: var(--accent);
  font-size: 16px;
  font-weight: normal;
  font-family: 'Mozilla Text', sans-serif;
  text-align: center;
}

.class-text-box p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  font-family: 'Mozilla Text', sans-serif;
}

/* Mobile-first: Desktop class text */
@media (min-width: 768px) {
  .class-text-box h3 {
    font-size: 18px;
  }
  .class-text-box p {
    font-size: 16px;
  }
}

/* Tabela do horário - Mobile first */
.schedule-table { 
  width: 100%; 
  max-width: 950px;
  border-collapse: collapse; 
  font-size: 12px;
  margin: 0 auto;
}
.schedule-table th, 
.schedule-table td { 
  padding: 8px; 
  border-bottom: 1px solid var(--accent); 
  text-align: left; 
}

.schedule-table .day-header td {
  border-bottom: none;
  padding-top: 30px;
  padding-bottom: 4px;
}
.schedule-table th { 
  color: #a3a8b3; 
  font-weight: 600; 
}
.schedule-table .day-header { 
  background: none; 
  font-weight: 700; 
  color: var(--accent); 
  border-bottom: none;
}
.schedule-table .time { 
  font-weight: 600; 
  color: #6b7280; 
}

/* Mobile-first: Desktop table */
@media (min-width: 768px) {
  .schedule-table {
    font-size: 14px;
  }
  .schedule-table th, 
  .schedule-table td { 
    padding: 12px; 
  }
}


