/* Design System Variables */
:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;
  
  /* Color Palette */
  --primary: #002D62;      /* CASIO Navy */
  --primary-light: #1E40AF;/* Vibrant Blue */
  --accent: #2563EB;
  --text-dark: #0F172A;    /* Slate 900 */
  --text-muted: #475569;   /* Slate 600 */
  --bg-light: #F8FAFC;     /* Slate 50 */
  --bg-white: #FFFFFF;
  --border-color: #E2E8F0; /* Slate 200 */
  
  /* Layout and Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-dark);
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.25rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-muted);
}

/* Helper Classes */
.text-center {
  text-align: center;
}

.bg-light {
  background-color: var(--bg-light);
}

.mt-auto {
  margin-top: auto;
}

.mt-4 {
  margin-top: 2rem;
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-light);
  color: var(--bg-white);
}

.btn-primary:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--bg-light);
  color: var(--text-dark);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
}

.btn-primary-light {
  background-color: var(--bg-white);
  color: var(--primary-light);
}

.btn-primary-light:hover {
  background-color: var(--bg-light);
  transform: translateY(-2px);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--bg-white);
  border-color: var(--bg-white);
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-outline-dark {
  background-color: transparent;
  color: var(--text-dark);
  border-color: var(--text-dark);
}

.btn-outline-dark:hover {
  background-color: var(--text-dark);
  color: var(--bg-white);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.text-link {
  color: var(--primary-light);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.text-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-light);
  background-color: rgba(30, 64, 175, 0.1);
  border-radius: 50px;
  margin-bottom: 1rem;
}

/* Section Header */
.section-header {
  margin-bottom: 4rem;
}

.section-subtitle {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Sections */
section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border-color);
}

/* Header & Navigation */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  max-height: 40px;
  width: auto;
  display: block;
}

.brand-text {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.logo-divider {
  margin: 0 0.5rem;
  color: var(--border-color);
  font-size: 1.25rem;
}

.tagline {
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-muted);
}

#main-nav ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2rem;
}

#main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}

#main-nav a:hover {
  color: var(--primary);
}

#main-nav .nav-contact-btn {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

#main-nav .nav-contact-btn:hover {
  background-color: var(--primary-light);
  color: var(--bg-white);
}

@media (max-width: 768px) {
  #main-nav {
    display: none; /* simple mobile fallback */
  }
}

/* Hero Section */
#hero {
  padding: 8rem 0;
  overflow: hidden;
  background-color: var(--bg-white);
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual .image-wrapper {
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    order: -1;
  }
}

/* Pillars Section */
.pilar-card {
  background-color: var(--bg-white);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.pilar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pilar-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  background-color: var(--bg-light);
  margin-bottom: 1.5rem;
}

.pilar-icon img {
  width: 32px;
  height: 32px;
}

.pilar-card h3 {
  margin-bottom: 0.75rem;
}

/* Calculators Section */
.calc-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.calc-img {
  background-color: var(--bg-light);
  padding: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 280px;
}

.calc-img img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.calc-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.calc-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.badge-blue {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--accent);
}

.calc-info p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.calc-action {
  margin-top: auto;
}

.others-header {
  margin: 5rem 0 2rem;
  text-align: center;
}

.others-header h3 {
  font-size: 1.75rem;
  color: var(--text-dark);
}

.other-calc-card {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: var(--transition);
}

.other-calc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.other-calc-card img {
  max-height: 120px;
  margin-bottom: 1rem;
}

.other-calc-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.other-calc-card p {
  font-size: 0.85rem;
}

/* Training Section */
.programs-grid {
  align-items: stretch;
}

.program-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.program-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  background-color: rgba(220, 38, 38, 0.1);
  color: #DC2626;
}

.badge-neutral {
  background-color: var(--bg-light);
  color: var(--text-muted);
}

.program-desc {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* UNAE Card highlights */
.featured-program {
  grid-column: span 2;
  background-color: var(--bg-light);
  border-color: #CBD5E1;
}

@media (max-width: 992px) {
  .featured-program {
    grid-column: span 1;
  }
}

.stats-mini {
  display: flex;
  gap: 2rem;
  margin: 1.5rem 0 2rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--primary);
  line-height: 1.1;
}

.stat-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Blog / News Section */
.post-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.post-img {
  height: 200px;
  overflow: hidden;
  background-color: #E2E8F0;
}

.post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.post-card:hover .post-img img {
  transform: scale(1.05);
}

.post-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.post-content h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.post-content p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Resources CTA Section */
.cta-banner {
  background-color: var(--primary);
  border-radius: var(--radius-lg);
  padding: 4rem;
  color: var(--bg-white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
}

.cta-banner h2 {
  color: var(--bg-white);
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
  max-width: 600px;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

@media (max-width: 992px) {
  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 3rem 2rem;
  }
  .cta-actions {
    flex-direction: column;
    width: 100%;
  }
}

/* Footer */
#site-footer {
  background-color: #0B132B;
  color: rgba(255, 255, 255, 0.6);
  padding: 5rem 0 2rem;
  font-size: 0.9rem;
}

#site-footer h3, #site-footer h4 {
  color: var(--bg-white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-img {
  max-height: 50px;
  width: auto;
  display: block;
  margin-bottom: 1.5rem;
}

.footer-links h4, .footer-social h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--bg-white);
  padding-left: 4px;
}

.social-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: var(--bg-white);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.85rem;
}

.social-pill:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.footer-email a {
  color: var(--bg-white);
  text-decoration: none;
  font-weight: 600;
}

.footer-bottom {
  padding-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Page Specific Styles */
.page-title-section {
  padding: 6rem 0 4rem;
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

#main-nav a.active {
  color: var(--primary) !important;
  font-weight: 700;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.25rem;
}

.spec-list {
  list-style: none;
  margin: 1rem 0 1.5rem;
  padding: 0;
}

.spec-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.25rem;
}

.spec-list li::before {
  content: "✓";
  color: var(--primary-light);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.product-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: auto;
}

.product-card-full {
  height: 100%;
}

.stat-box {
  padding: 2rem 1.5rem;
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Filter pills and hidden cards for blog */
.blog-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}

.filter-pill {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover, .filter-pill.active {
  background-color: var(--primary-light);
  color: var(--bg-white);
  border-color: var(--primary-light);
}

.post-card.hidden {
  display: none !important;
}


/* Newsletter Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 1rem;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.modal-backdrop.active .modal-box {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
}
.modal-close:hover {
  color: #0f172a;
}
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: #1e293b;
}
.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}
