/* ============================================================
   RESPONSIVE.CSS — AthenaS Full Responsive System
   ============================================================ */

/* ── Base image safety ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.section-image img,
.service-main-image,
.blog-card img,
.blog-content img {
  width: 100%;
  object-fit: cover;
  border-radius: 24px;
}

.service-main-image { height: 220px; }
.blog-card img      { height: 260px; }
.blog-content img   { max-height: 420px; }

/* ── Container ── */
.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* ── Section Grid (alternating image/text) ── */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

/* ── Blog card image fix ── */
.blog-card img,
.blog-card-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  display: block;
}

.blog-content img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.service-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

/* ── Blog card equal height ── */
.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}

.blog-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 55px rgba(180, 92, 255, 0.25);
}

.blog-card-img {
  flex-shrink: 0;
  overflow: hidden;
}

.blog-card-content {
  flex: 1;
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-card-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.45;
  margin: 0;
}

.blog-card-content p {
  font-size: 0.85rem;
  color: rgba(200, 190, 230, 0.75);
  margin: 0;
}

.blog-card-content span {
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: #b45cff;
  letter-spacing: 0.05em;
}

/* ── Sidebar sticky (desktop only) ── */
.blog-sidebar {
  position: sticky;
  top: 110px;
  align-self: start;
}

/* ── Tablet (≤ 1100px) ── */
@media (max-width: 1100px) {
  .nav-menu { gap: 1.25rem; }
  .nav-link,
  .dropdown-toggle { font-size: 0.875rem; }
  .navbar-logo, .brand-logo { width: 165px; max-height: 76px; }
  .header-right { gap: 0.75rem; }

  .card-grid  { grid-template-columns: repeat(2, 1fr); }
  .three-grid { grid-template-columns: repeat(2, 1fr); }
  .four-grid  { grid-template-columns: repeat(2, 1fr); }

  .home-stats-grid,
  .testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-grid {
    gap: 36px;
  }

  .footer-grid,
  .footer-bottom-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 48px;
  }

  .premium-footer { padding: 64px 6% 0; }
}

/* ── Tablet (≤ 991px) ── */
@media (max-width: 991px) {
  .site-header { height: 88px; }
  .header-inner { height: 88px; }
  /* Only apply padding-top when site-header is present (not on homepage with bx-navbar) */
  body:not(:has(.bxh)) { padding-top: 88px; }
  .navbar-logo, .brand-logo { width: 155px; max-height: 70px; }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .section-image {
    order: -1;
  }

  .home-value-section .value-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .value-image-wrap { max-width: 100%; }
  .value-image { height: 420px; }

  .blog-sidebar {
    position: static;
  }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header { height: 78px; }
  .header-inner { height: 78px; }
  body:not(:has(.bxh)) { padding-top: 78px; }

  .navbar-logo, .brand-logo { width: 135px; max-height: 62px; }

  .nav-menu {
    display: none !important;
    position: fixed !important;
    top: 78px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 78px);
    height: calc(100dvh - 78px);
    background: rgba(5, 0, 18, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    padding: 1.5rem 1.75rem 2rem;
    border-top: 1px solid rgba(135, 70, 255, 0.15);
    overflow-y: auto;
    z-index: 9998;
    overscroll-behavior: contain;
  }

  .nav-menu.open { display: flex !important; }

  body.menu-open { overflow: hidden; }

  .nav-link,
  .dropdown-toggle {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-item,
  .has-dropdown,
  .services-nav-wrap {
    width: 100%;
  }

  .services-nav-wrap {
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .services-nav-wrap .nav-link { border-bottom: 0; }

  .dropdown-toggle-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .nav-link::after,
  .dropdown-toggle::after { display: none; }

  .dropdown-menu {
    position: static;
    transform: none;
    min-width: 100%;
    background: rgba(135, 70, 255, 0.08);
    border: none;
    border-radius: 12px;
    box-shadow: none;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    display: none;
  }

  .has-dropdown.open .dropdown-menu { display: block; }

  .lang-wrap { display: block; position: relative; }

  .lang-btn {
    width: 44px;
    height: 44px;
    justify-content: center;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
  }

  .lang-flag { font-size: 20px; }
  .lang-label, .dropdown-arrow { display: none; }

  .lang-dropdown {
    position: fixed;
    top: 84px;
    left: 16px;
    right: 16px;
    width: auto;
    max-height: min(70vh, 520px);
    grid-template-columns: 1fr;
    padding: 10px;
    border-radius: 16px;
    z-index: 10020;
  }

  .hamburger { display: flex; }

  .btn-header {
    font-size: 0.7rem;
    padding: 0.55rem 1rem;
    letter-spacing: 0.06em;
    display: none;
  }

  .section { padding: 3rem 0; }

  .hero-section { min-height: calc(100vh - 78px); }
  .hero-content { padding: 3rem 1rem; }
  .hero-content h1 { font-size: clamp(2rem, 8vw, 3rem); }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary,
  .btn-outline { width: 100%; justify-content: center; }

  .split-grid,
  .reverse-grid,
  .card-grid,
  .three-grid,
  .four-grid,
  .logos-grid,
  .what-grid,
  .blog-grid,
  .section-grid { grid-template-columns: 1fr; }

  .reverse-grid > *:first-child { order: unset; }

  .home-stats-grid,
  .testimonial-grid { grid-template-columns: 1fr; }

  .blog-card-grid { grid-template-columns: 1fr; }

  .blog-card img,
  .blog-card-img img { height: 200px; }

  .blog-sidebar { position: static; }

  .container,
  .footer-container,
  .intro-container,
  .value-container,
  .bd-container,
  .sb-container,
  .category-container,
  .blog-container,
  .careers-container,
  .contact-container {
    width: min(100% - 32px, 1200px);
  }

  .header-inner { gap: 0.75rem; }
  .header-right { gap: 0.55rem; }

  .hamburger {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .hero-section {
    min-height: calc(100svh - 78px);
    align-items: flex-start;
  }

  .hero-content {
    width: 100%;
    max-width: 520px;
    padding: clamp(3.75rem, 9vh, 5rem) 1rem 6.5rem;
  }

  .hero-pill {
    max-width: 100%;
    padding: 0.55rem 1.35rem;
    font-size: 0.7rem;
    letter-spacing: 0.28em;
    white-space: normal;
    text-align: center;
  }

  .hero-content h1 {
    font-size: clamp(2.25rem, 10vw, 3.35rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .hero-subtitle { font-size: clamp(1rem, 4.6vw, 1.35rem); line-height: 1.55; }
  .hero-copy { font-size: 1rem; line-height: 1.65; margin-bottom: 1.9rem; }
  .hero-actions { max-width: 440px; gap: 0.9rem; }

  .btn-primary,
  .btn-outline,
  .gradient-btn,
  .premium-cta-btn {
    min-height: 52px;
    padding: 0.9rem 1.2rem;
    letter-spacing: 0.08em;
    text-align: center;
  }

  .floating-contact-bar {
    right: 50%;
    bottom: 16px;
    top: auto;
    flex-direction: row;
    gap: 12px;
    transform: translateX(50%);
    z-index: 9980;
  }

  .float-icon { width: 46px; height: 46px; font-size: 18px; }

  .page-hero,
  .page-hero-small,
  .blog-hero,
  .category-hero,
  .bd-hero,
  .sb-hero,
  .careers-page .careers-hero,
  .contact-page .contact-hero,
  .ap-hero {
    min-height: auto;
    padding: 56px 0 44px;
    border-bottom-left-radius: 34px;
    border-bottom-right-radius: 34px;
  }

  .ph-content h1,
  .blog-hero h1,
  .category-hero h1,
  .bd-hero h1,
  .sb-hero h1,
  .careers-page .careers-hero h1,
  .contact-page .contact-hero h1,
  .contact-page .contact-hero h2,
  .ap-hero__title {
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.14;
    overflow-wrap: anywhere;
  }

  .section,
  .home-value-section,
  .home-stats-section,
  .testimonials-section,
  .what-athens-do,
  .athena-intro-section,
  .mission-vision-section,
  .premium-cta {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .section-head { margin-bottom: 2rem; }

  .section-head h2,
  .what-athens-do h2,
  .intro-title,
  .value-content h2,
  .cta-box h2 {
    font-size: clamp(1.85rem, 8vw, 2.65rem);
    line-height: 1.18;
    letter-spacing: 0;
  }

  .copy-block,
  .info-card,
  .service-card,
  .stat-card,
  .blog-card,
  .hero-copy-block,
  .mv-card,
  .cta-box {
    border-radius: 18px;
    padding: 1.45rem;
  }

  .visual-card,
  .page-img-card {
    min-height: 240px;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
  }

  .value-image-wrap { max-width: 100%; }
  .value-image { height: 320px; }

  .premium-service-card { min-height: auto; border-radius: 18px; }
  .service-card-content { padding: 26px; }

  .solution-columns { padding: 0 1rem; }
  .solution-item { padding: 36px 18px; }

  .cta-subtitle { letter-spacing: 0.25em; line-height: 1.5; }

  .ld-hero,
  .service-hero,
  .resourcing-hero,
  .software-hero,
  .accounting-hero,
  .safety-hero,
  .inventory-hero,
  .quality-hero,
  .sustainability-hero {
    padding: 56px 0 46px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
  }

  .ld-hero-grid,
  .service-hero-grid,
  .accounting-hero-grid,
  .safety-grid,
  .inventory-hero-grid,
  .quality-hero-grid,
  .sustainability-hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ld-hero-title,
  .service-hero-content h1,
  .accounting-hero-content h1,
  .safety-content h1,
  .inventory-hero-content h1,
  .quality-hero-content h1,
  .sustainability-hero-content h1 {
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.14;
    overflow-wrap: anywhere;
  }

  .ld-hero-img,
  .service-hero-image,
  .accounting-hero-image,
  .inventory-hero-image,
  .quality-hero-image,
  .sustainability-hero-image {
    width: 100%;
    max-width: 360px;
    justify-self: center;
  }

  .scroll-to-top {
    right: 16px;
    bottom: 84px;
    width: 46px;
    height: 46px;
    font-size: 16px;
  }

  /* Footer */
  .premium-footer { padding: 52px 5% 0; }

  .footer-grid,
  .footer-bottom-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-column {
    align-items: center;
    text-align: center;
  }

  .footer-column ul li a:hover,
  .footer-map-link:hover { transform: none; }

  .footer-bottom-grid { margin-top: 36px; padding-top: 36px; }

  .footer-copyright {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    margin-top: 40px;
  }

  .footer-legal-links { justify-content: center; gap: 16px; }

  /* Contact page */
  .contact-page .contact-grid,
  .contact-page .contact-info-grid,
  .contact-page .form-row {
    grid-template-columns: 1fr;
  }

  .contact-page .contact-hero {
    min-height: 380px;
    border-bottom-left-radius: 45px;
    border-bottom-right-radius: 45px;
  }

  .contact-page .contact-main-section { padding: 80px 0 70px; }

  /* Careers */
  .careers-page .filter-grid,
  .careers-page .job-row { grid-template-columns: 1fr; }
  .careers-page .job-meta { text-align: left; }
}

/* ── Small mobile (≤ 576px) ── */
@media (max-width: 576px) {
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  p  { font-size: 15px; line-height: 1.7; }

  .navbar-logo, .brand-logo { width: 120px; max-height: 56px; }

  .container { width: 94%; }
  .section { padding: 60px 0; }

  .home-value-section { padding: 60px 0; }
  .value-content h2 { font-size: 32px; }
  .value-content li { font-size: 16px; }
  .value-content strong { font-size: 17px; }
  .value-image-border { border-radius: 22px; }
  .value-image { height: 280px; border-radius: 18px; }

  .blog-card-grid { grid-template-columns: 1fr; gap: 20px; }
  .blog-card img,
  .blog-card-img img { height: 180px; }

  .contact-page .contact-form-card { padding: 32px 22px; }
  .contact-page .contact-map-section { height: 300px; }
}

/* ── Very small (≤ 420px) ── */
@media (max-width: 420px) {
  .container,
  .footer-container,
  .intro-container,
  .value-container,
  .bd-container,
  .sb-container,
  .category-container,
  .blog-container,
  .careers-container,
  .contact-container {
    width: min(100% - 24px, 1200px);
  }

  .brand-logo { width: 132px; }

  .hero-content {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .hero-content h1 { font-size: clamp(2rem, 10vw, 2.75rem); }
  .hero-pill { letter-spacing: 0.22em; }

  .btn-primary,
  .btn-outline,
  .gradient-btn,
  .premium-cta-btn { font-size: 0.8rem; }
}

/* ── Ensure footer never hidden behind header ── */
.premium-footer,
.site-footer {
  position: relative;
  z-index: 1;
}
