/* ==========================================================================
   F2PROM & GLOBAL PREVENTIUM - CORPORATE DESIGN SYSTEM & MOBILE OPTIMIZATION
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Corporate Palette */
  --primary-teal: #009A96;
  --primary-teal-dark: #007A77;
  --primary-teal-light: #E6F6F6;
  --primary-teal-glow: rgba(0, 154, 150, 0.25);

  --secondary-navy: #1E293B;
  --secondary-navy-deep: #0F172A;

  --global-blue: #2B4B9B;
  --global-blue-light: #EEF2FF;
  --global-blue-glow: rgba(43, 75, 155, 0.25);

  --accent-amber: #D97706;
  --accent-amber-light: #FFFBEB;
  
  --success-emerald: #10B981;
  --success-emerald-light: #ECFDF5;

  /* Theme System */
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-glass-card: rgba(255, 255, 255, 0.75);

  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;

  --border-light: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-brand: rgba(0, 154, 150, 0.35);

  /* Shadows & Radius */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 20px 45px -10px rgba(0, 154, 150, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1280px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-main: #090D16;
  --bg-card: #131C2E;
  --bg-glass: rgba(19, 28, 46, 0.88);
  --bg-glass-card: rgba(19, 28, 46, 0.78);

  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;

  --border-light: #1E293B;
  --border-medium: #334155;

  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 35px rgba(0, 0, 0, 0.55);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: var(--text-primary);
  background-color: var(--bg-main);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
}

/* Ambient Glowing Background Orbs */
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  animation: orbFloat 18s ease-in-out infinite alternate;
}

.orb-1 {
  top: -100px;
  right: -50px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-teal-glow), transparent);
}

.orb-2 {
  top: 700px;
  left: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--global-blue-glow), transparent);
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 30px) scale(1.08); }
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   TOP CORPORATE ANNOUNCEMENT BAR
   ========================================================================== */
.top-corporate-bar {
  background: linear-gradient(90deg, var(--secondary-navy-deep) 0%, var(--global-blue) 100%);
  color: #FFFFFF;
  padding: 0.5rem 0;
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   NAVBAR & LOGO RENDERING (NO CUT-OFF)
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Logo Box styling to prevent any cut off */
.brand-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.brand-logo-box:hover {
  transform: scale(1.03);
}

.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 32px;
  background-color: var(--border-medium);
}

.brand-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.25;
}

.brand-tagline span {
  color: var(--global-blue);
  font-weight: 700;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-teal);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Mobile Navigation Hamburger Button */
.mobile-menu-btn {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Mobile Drawer Overlay */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 340px;
  height: 100vh;
  background: var(--bg-card);
  z-index: 2500;
  box-shadow: var(--shadow-xl);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-drawer.active {
  right: 0;
}

.mobile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2400;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-teal-dark) 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 16px var(--primary-teal-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-teal-glow);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border-medium);
  color: var(--text-primary);
}

/* ==========================================================================
   HERO SECTION & RESPONSIVE CLAMP TYPOGRAPHY
   ========================================================================== */
.hero {
  padding: 4rem 0 5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.1rem;
  background: var(--primary-teal-light);
  color: var(--primary-teal-dark);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-brand);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.hero-title span.highlight {
  background: linear-gradient(135deg, var(--primary-teal), var(--global-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 620px;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.feature-pill {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-card);
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  font-weight: 700;
}

.feature-pill i {
  color: var(--success-emerald);
  font-size: 1.25rem;
}

.hero-card-preview {
  background: var(--bg-glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
  position: relative;
}

.card-header-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--accent-amber), #B45309);
  color: #FFFFFF;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.trust-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-item {
  background: var(--bg-main);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-light);
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-teal);
  display: block;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   HOMOLOGATION BANNER & LOGO CENTERING
   ========================================================================== */
.homologation-bar {
  background: var(--secondary-navy);
  color: #FFFFFF;
  padding: 3rem 0;
}

.homologation-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2.5rem;
  align-items: center;
}

.homo-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.homo-logo-img {
  height: 56px;
  width: auto;
  background: #FFFFFF;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.homo-text h4 {
  color: #FFFFFF;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.homo-text p {
  color: #94A3B8;
  font-size: 0.85rem;
}

.homo-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--primary-teal);
  font-size: 1.6rem;
}

/* ==========================================================================
   CATALOG SECTION & CARDS
   ========================================================================== */
.catalog-section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3rem;
}

.section-subtitle {
  color: var(--primary-teal);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.8rem;
}

.filter-bar {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.search-input {
  width: 100%;
  padding: 0.95rem 1rem 0.95rem 3.2rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-light);
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-teal);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px var(--primary-teal-glow);
}

.filter-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-main);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary-teal);
  box-shadow: var(--shadow-sm);
}

.filter-select {
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
}

.course-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-brand);
}

.course-badge-sector {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.sector-construccion {
  background: rgba(217, 119, 6, 0.15);
  color: #B45309;
}

.sector-metal {
  background: rgba(43, 75, 155, 0.15);
  color: var(--global-blue);
}

.course-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  line-height: 1.35;
}

.course-specs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.spec-item i {
  color: var(--primary-teal);
  margin-right: 0.4rem;
}

.course-pricing-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.price-amount {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ==========================================================================
   MARKETING STUDIO CARTELES
   ========================================================================== */
.marketing-studio-section {
  padding: 5rem 0;
  background: radial-gradient(circle at 50% 50%, rgba(43, 75, 155, 0.05) 0%, transparent 80%);
}

.carteles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.cartel-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.cartel-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.cartel-img-wrapper {
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: var(--secondary-navy);
  position: relative;
}

.cartel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cartel-content {
  padding: 1.5rem;
}

.cartel-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-teal-light);
  color: var(--primary-teal-dark);
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.prompt-copy-box {
  background: var(--bg-main);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 1rem;
  max-height: 80px;
  overflow-y: auto;
}

/* ==========================================================================
   FUNDAE CALCULATOR & CONTACT
   ========================================================================== */
.calculator-section {
  background: linear-gradient(135deg, var(--secondary-navy) 0%, var(--secondary-navy-deep) 100%);
  color: #FFFFFF;
  padding: 5rem 0;
  border-radius: var(--radius-lg);
  margin: 3rem 0;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.calc-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2rem;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #E2E8F0;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
}

.calc-results {
  background: rgba(0, 154, 150, 0.15);
  border: 1px solid var(--primary-teal);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.res-value {
  font-size: 2rem;
  font-weight: 800;
  color: #34D399;
}

/* Mobile Bottom Sticky CTA Bar */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-light);
  padding: 0.75rem 1rem;
  z-index: 1500;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
}

.mobile-sticky-cta .btn {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.95rem;
}

/* Footer */
.footer {
  background: var(--secondary-navy-deep);
  color: #94A3B8;
  padding: 4rem 0 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ==========================================================================
   MOBILE & TABLET BREAKPOINTS (100% RESPONSIVE)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid, .calc-grid, .homologation-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .top-bar-container {
    font-size: 0.78rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none; /* Hidden on mobile; available in drawer */
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .mobile-sticky-cta {
    display: block;
  }
  body {
    padding-bottom: 60px; /* Offset for sticky mobile bar */
  }
  .hero-features {
    grid-template-columns: 1fr;
  }
  .courses-grid, .carteles-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .homologation-grid {
    text-align: center;
  }
  .homo-box {
    flex-direction: column;
    text-align: center;
  }
  .calc-results {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
