/* Standardized Header & Footer Styles */
/* Based on Home Page (index.html) Reference */

:root {
  --brand-font: 'Marcellus', serif;
  --site-header-height: 90px;
  --font-size-base: 16px;
  --brand: #ffb823;
  --accent: #ff9a3d;
  --btn-radius: 10px; /* Standardized Radius */
}

/* Global Reset/Normalization for Header/Footer Context */
#site-header, #site-footer {
  box-sizing: border-box;
}
#site-header *, #site-footer * {
  box-sizing: border-box;
}

/* Header Structure */
#site-header {
  height: var(--site-header-height, 90px) !important;
  min-height: var(--site-header-height, 90px) !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483647; /* High z-index to overlay everything */
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

#site-header .nav-container {
  height: var(--site-header-height, 90px) !important;
  display: flex;
  align-items: center;
  padding: 0 24px;
  max-width: 1440px;
  margin: 0 auto;
}

/* Logo */
.logo-icon img {
  width: 201px;
  height: auto;
  display: block;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: #111827;
  font-weight: 500;
  font-size: 18px;
  font-family: var(--brand-font), serif;
  transition: color 0.2s;
}

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

.nav-link i {
  font-size: 18px;
}

/* Dropdown Styles */
.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 12px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1000;
  list-style: none;
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 0;
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: #111827;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.dropdown-menu a:hover {
  background: #f3f4f6;
  color: #ffb823;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Button Standardization */
.header-btn, 
.btn, 
button {
  font-family: var(--brand-font), serif;
  font-weight: 700;
  border-radius: var(--btn-radius) !important; /* 10px Standard */
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 44px; /* Matches home page */
  font-size: 16px;
  padding: 10px 20px;
  line-height: 1.2;
}

/* Icon Buttons */
.header-icon-btn {
  padding: 10px;
  min-width: 44px;
  width: 44px; /* Ensure circular/square consistency if needed, but we want rounded rect */
  justify-content: center;
}

/* Primary Button Style */
.btn-primary, 
.header-btn.btn-primary {
  background: linear-gradient(135deg, #ffb823, #ff9a3d) !important;
  color: #fff !important; /* Fixed: Home page had #000, but usually primary is white text. User said match blogs.html login which is likely consistent with recent changes. */
  border: 1px solid #ff9a3d !important;
  text-shadow: none;
}
/* Update: Recent memory says primary buttons use linear gradient. */

.btn-primary:hover, 
.header-btn.btn-primary:hover {
  filter: brightness(1.02);
  box-shadow: 0 4px 12px rgba(255, 184, 35, 0.3);
  transform: translateY(-1px);
}

/* Secondary/Outline Button Style */
.btn-secondary, 
.header-btn.btn-secondary,
.btn-outline {
  background: #f3f4f6 !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb !important;
}

.btn-secondary:hover, 
.header-btn.btn-secondary:hover {
  background: #e5e7eb !important;
  color: #000 !important;
}

/* Ink/Text Button Style */
.btn-ink {
  background: transparent !important;
  color: #111827 !important;
  border: 1px solid transparent !important;
  padding: 8px 16px;
}

.btn-ink:hover {
  text-decoration: underline;
}

/* Footer Styles - International Design */
#site-footer {
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 64px 0 32px;
  font-family: system-ui, -apple-system, sans-serif; /* Clean UI font */
  color: #4b5563;
  width: 100% !important;
  margin-top: 0;
}

#site-footer .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Section Grid */
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
  margin-bottom: 64px;
}

/* Brand Column */
.brand-col .footer-logo img {
  height: 40px;
  width: auto;
  margin-bottom: 20px;
}

.footer-tagline {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
  color: #6b7280;
  max-width: 300px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%; /* Circular icons */
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  transition: all 0.2s;
  font-size: 14px;
  text-decoration: none;
}

.footer-social a:hover {
  background: #ff9a3d;
  border-color: #ff9a3d;
  color: #fff;
}

/* Links Columns */
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #111827;
  margin-bottom: 24px;
  margin-top: 0;
}

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

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  text-decoration: none;
  color: #4b5563;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #ff9a3d;
}

/* Mobile Navigation */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #111827;
  cursor: pointer;
  padding: 8px;
  margin-right: 12px;
}

.mobile-nav-overlay {
  position: fixed;
  top: 90px; /* Match header height */
  left: 0;
  width: 100%;
  height: calc(100vh - 90px);
  background: #fff;
  z-index: 2147483646;
  padding: 24px;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  overflow-y: auto;
  border-top: 1px solid #e5e7eb;
}

.mobile-nav-overlay.active {
  transform: translateX(0);
}

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-nav-link {
  font-family: var(--brand-font), serif;
  font-size: 20px;
  color: #111827;
  text-decoration: none;
  font-weight: 500;
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.mobile-nav-link:hover {
  color: var(--brand);
}

/* Mobile Submenu */
.mobile-submenu {
  margin-top: 10px;
  padding-left: 20px;
  display: none;
}
.mobile-submenu.open {
  display: block;
}
.mobile-submenu a {
  font-size: 16px;
  color: #4b5563;
  padding: 8px 0;
  display: block;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .primary-nav {
    display: none !important;
  }
  .mobile-menu-btn {
    display: block;
  }
  /* Adjust header actions if needed */
  .header-actions .btn-secondary span:not(#cartBadge) {
    display: none; /* Hide 'Cart' text on mobile, keep icon */
  }
  .header-actions .btn-primary span.user-name {
     display: none; /* Hide 'Login' text on mobile */
  }
  .header-btn {
     padding: 10px; /* reduce padding */
     min-width: 40px;
  }
  .logo-icon img {
    width: 160px; /* Slightly smaller logo on mobile */
  }
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #9ca3af;
}

.footer-bottom .copyright {
    color: #9ca3af;
}

.built-by {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #9ca3af;
}

.built-by img.gate-logo-small {
    height: 20px;
    width: auto;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: all 0.2s;
}

.built-by:hover img.gate-logo-small {
    opacity: 1;
    filter: none;
}

/* Store Badges in Footer */
.store-badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111827;
  color: #fff;
  padding: 8px 16px;
  border-radius: 10px; /* Standardized Radius */
  font-size: 0.75rem;
  cursor: pointer;
  transition: opacity 0.2s;
  width: fit-content;
  min-width: 140px;
  text-decoration: none;
}

.store-btn:hover {
  opacity: 0.9;
}

.store-btn i {
  font-size: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  #site-header .nav-links {
    display: none; /* Hide standard nav on mobile, need hamburger */
  }
  /* Note: Home page doesn't seem to have a hamburger in the raw HTML I saw, 
     but new-header.js did. I'll need to handle mobile nav. */
}

@media (max-width: 640px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* Spacer for Fixed Header */
body {
  padding-top: 90px;
}

/* Policy Pages Layout */
.policy-page {
    background-color: #fff;
}

.policy-container {
    width: 90%;
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 24px;
    min-height: 60vh;
}

.content-section {
  background: white;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.section-title {
  font-family: 'Marcellus', serif;
  color: #111827;
  border-bottom: 2px solid #ffb823;
  padding-bottom: 15px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
}

.section-icon {
  width: 40px;
  height: 40px;
  background: #f3f4f6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1f2937;
  font-size: 1.2rem;
}

.hero-section {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem;
}

.hero-title {
    font-family: 'Marcellus', serif;
    font-size: 3rem;
    color: #111827;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.highlight-box {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  border-left: 4px solid #ffb823;
}

.highlight-box h4 {
  color: #111827;
  margin-top: 0;
  margin-bottom: 8px;
}

.warning-box {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  color: #92400e;
}

.warning-box h4 {
  color: #92400e;
  margin-top: 0;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive Policy Adjustments */
@media (max-width: 768px) {
    .policy-container {
        margin-top: 40px;
        padding: 0 16px;
    }
    
    .content-section {
        padding: 24px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

/* Contact Section in Policy Pages */
.contact-section {
  background: linear-gradient(135deg, #1f2937, #111827);
  color: white;
  padding: 60px;
  border-radius: 20px;
  text-align: center;
  margin-top: 60px;
}

.contact-title {
  font-family: 'Marcellus', serif;
  font-size: 2rem;
  margin-bottom: 16px;
  color: #ffb823;
}

.contact-description {
  color: #9ca3af;
  margin-bottom: 32px;
  font-size: 1.1rem;
}

.contact-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-white {
  background: white !important;
  color: #111827 !important;
  border: 1px solid white !important;
}

.btn-white:hover {
  background: #f3f4f6 !important;
  transform: translateY(-2px);
}
