/* layout.css */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  box-sizing: border-box;
}

/* --- Premium Sticky Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  transition: all 0.3s ease;
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

/* Logo */
.logo {
  display: flex;
  align-items: center;
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.logo-flow {
  color: var(--primary-color);
}

.logo-desk {
  color: var(--text-dark);
}

.footer .logo-desk {
  color: var(--text-light);
}

/* Navigation */
.nav-links {
  display: none;
}

@media (min-width: 992px) {
  .nav-links {
    display: flex;
    gap: var(--space-8);
    align-items: center;
  }
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
}

@media (min-width: 992px) {
  .mobile-menu-btn { display: none; }
}

/* --- Layout Sections --- */
.section {
  padding: var(--space-24) 0;
  position: relative;
}

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.05) 0%, rgba(255,255,255,0) 50%),
              radial-gradient(circle at bottom left, rgba(30, 58, 138, 0.05) 0%, rgba(255,255,255,0) 50%);
}

/* --- Grids --- */
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: var(--space-8);
}

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

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

/* --- Footer --- */
.footer {
  background-color: var(--bg-darker);
  color: var(--text-light-muted);
  padding: var(--space-16) 0 var(--space-8) 0;
}

.footer h4 {
  color: var(--text-light);
  margin-bottom: var(--space-6);
  font-size: 1.125rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--text-light-muted);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* --- Mobile Responsiveness Overrides --- */

/* Mobile Menu Dropdown */
@media (max-width: 991px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-6) var(--space-8);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0,0,0,0.05);
    z-index: 999;
  }
  .nav-links.mobile-active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
  }
  .nav-link {
    font-size: 1.15rem;
    padding: var(--space-4) 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-actions {
    display: none; /* Hide buttons on small screens in nav bar, optionally move to menu */
  }
  .nav-actions.mobile-header-actions {
    display: flex;
  }
}

/* Mobile Layout Utilities */
@media (max-width: 768px) {
  html {
    font-size: 14px; /* Scales down all rem units globally */
  }
  
  .section {
    padding: var(--space-16) 0 !important;
  }
  
  /* Force grids and flex containers to stack */
  .mobile-stack {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    gap: var(--space-8) !important;
  }
  
  .mobile-text-center {
    text-align: center !important;
    align-items: center !important;
  }

  .mobile-hide {
    display: none !important;
  }
}
