/* ==================================================
   RESPONSIVE STYLES
   ================================================== */

/* Tablet Hero Sizing (768px to 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-slider-section {
    margin-top: 0;
    padding: 0;
  }
  .hero-slider {
    height: 100%;
  }
  .hero-slide {
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
  }
  .hero-container-slider {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 420px;
    padding: 60px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .hero-text-content {
    max-width: 550px;
    margin: 0 auto;
    padding: 0 24px;
  }
  .hero-subtitle {
     margin-bottom: 12px;
     font-size: 13px;
  }
  .hero-title {
    font-size: 28px;
    line-height: 1.32;
    margin-bottom: 12px;
  }
  .hero-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }
  .slide-overlay {
    display: block;
    background: linear-gradient(
      to bottom,
      rgba(11, 35, 69, 0.75) 0%,
      rgba(11, 35, 69, 0.85) 100%
    );
  }
  .premium-stats {
    padding: 24px 0 32px 0;
  }
  .premium-stat-item {
    padding: 10px 15px;
  }
}

/* Laptop & Large Tablets (1024px and below) */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }

  /* Top Bar - Mobile & Tablet Clean Layout (<= 1024px) */
  .top-bar {
    display: block !important;
    padding: 6px 0 !important;
    background-color: var(--primary-dark) !important;
  }

  .top-bar-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .top-socials {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .top-socials a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: var(--transition);
    padding: 0 !important;
    margin: 0 !important;
  }

  .top-contacts {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 13px !important;
  }

  .top-contacts a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    color: #e5e7eb !important;
    transition: var(--transition);
    font-size: 0 !important; /* Hide text completely */
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Ensure consistent icon sizes inside links */
  .top-contacts a svg,
  .top-socials a svg {
    width: 18px !important;
    height: 18px !important;
  }

  .about-grid,
  .contact-grid {
    gap: 40px;
  }

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

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

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

/* Tablets (768px and below) */
@media (max-width: 768px) {
  .section {
    padding: 70px 0;
  }

  /* Header & Navigation */
  .header-inner {
    height: 60px;
  }

  .main-header.scrolled .header-inner {
    height: 60px;
  }

  .logo {
    gap: 8px !important;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }
  .logo-text h1 {
    font-size: 17px !important;
    white-space: nowrap !important;
  }
  .logo-text span {
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  .mobile-menu-btn {
    display: flex;
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--border-color);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease-in-out;
  }

  .main-nav.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
  }

  .main-nav li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  .main-nav li:last-child {
    border-bottom: none;
  }

  .main-nav a {
    display: block;
    padding: 16px 24px;
    font-size: 16px;
  }

  .main-nav a::after {
    display: none;
  }

  .main-nav a:hover,
  .main-nav a.active {
    background-color: var(--bg-light);
    color: var(--primary);
  }

  /* Hero Section */
  .hero-slider-section {
    background-color: #0b2345;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    padding: 0;
    min-height: 350px;
  }

  .hero-slider {
    min-height: 100%;
    position: relative;
  }

  .hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #0b2345;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }

  .hero-slide.active {
    position: absolute;
    min-height: 100%;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
  }

  .hero-container-slider {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 350px;
    padding: 60px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: transparent;
    box-sizing: border-box;
    text-align: center;
    grid-template-columns: none;
    gap: 0;
    position: relative;
    z-index: 2;
  }

  .desktop-only {
    display: none;
  }

  .slide-overlay {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      to bottom,
      rgba(11, 35, 69, 0.75) 0%,
      rgba(11, 35, 69, 0.85) 100%
    );
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    z-index: 1;
  }

  .hero-text-content {
    padding: 0 16px;
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
  }

  .hero-subtitle {
    font-size: 11px;
    margin-top: 0;
    margin-bottom: 10px;
    padding: 4px 10px;
    display: inline-block;
  }

  .hero-title {
    font-size: 21px;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.35;
    padding: 0;
    font-family: 'Alexandria', sans-serif;
  }

  .hero-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
    line-height: 1.55;
    padding: 0;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0;
    width: auto;
    margin: 0 auto;
    padding: 0;
  }

  .slide-outline-btn {
    display: none;
  }

  .hero-btn-primary {
    width: auto;
    min-width: 150px;
    padding: 10px 24px;
    font-size: 13px;
  }

  .slider-dots {
    display: none;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* About Section */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .about-image-wrapper {
    order: -1; /* Image appears first on mobile */
    margin-bottom: 50px;
  }

  .about-asym-composition {
    height: 520px;
  }

  .about-img-main {
    top: 30px;
    right: 0;
    width: 56%;
    height: 420px;
    z-index: 3;
  }

  .about-img-secondary {
    top: 0;
    left: 0;
    width: 48%;
    height: 220px;
    z-index: 1;
  }

  .about-img-tertiary {
    bottom: 0px;
    left: 6%;
    width: 50%;
    height: 240px;
    z-index: 2;
  }

  .about-experience-badge,
  .about-overlay-badge,
  .about-association-badge {
    bottom: 12px !important;
    left: 12px !important;
    right: 12px !important;
    padding: 8px 12px !important;
    transform: scale(0.9) !important;
    transform-origin: bottom center !important;
  }
  .about-img-container:hover .about-experience-badge,
  .about-img-container:hover .about-overlay-badge,
  .about-img-container:hover .about-association-badge {
    transform: scale(0.9) !important;
  }

  .badge-title {
    font-size: 14px;
  }

  .badge-desc {
    font-size: 12px;
  }

  /* Contact Section */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Premium Stats & Map */
  .premium-stats {
    padding: 30px 0;
  }
  .premium-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .premium-stat-item {
    padding: 8px 12px !important;
  }

  .map-container {
    height: 350px;
  }
}

/* Mobile Devices and Tablets (767px and below) */
@media (max-width: 767px) {
  /* Floating Contact Widget Mobile Replacement */
  .floating-contact-widget {
    display: none !important;
  }

  body {
    padding-bottom: 60px; /* Space for the bottom bar */
  }

  .mobile-bottom-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: var(--primary-dark) !important;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15) !important;
    z-index: 10000 !important;
    height: 60px !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .mb-item,
  .mb-item:hover,
  .mb-item:active,
  .mb-item:focus,
  .mb-item:visited {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    gap: 4px;
    transition: opacity 0.2s;
  }

  .mb-item svg,
  .mb-item:hover svg,
  .mb-item:active svg,
  .mb-item:focus svg,
  .mb-item:visited svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none !important;
  }

  .mb-item svg *,
  .mb-item:hover svg *,
  .mb-item:active svg *,
  .mb-item:focus svg *,
  .mb-item:visited svg * {
    stroke: #ffffff !important;
    color: #ffffff !important;
    fill: none !important;
  }

  /* HARD OVERRIDES FOR ALL FLOATING/MOBILE WHATSAPP BUTTONS AND ALL THEIR NESTED ELEMENTS */
  .whatsapp-btn,
  .whatsapp-btn *,
  .mobile-whatsapp,
  .mobile-whatsapp *,
  .floating-whatsapp,
  .floating-whatsapp *,
  .contact-whatsapp,
  .contact-whatsapp *,
  .fc-card-whatsapp,
  .fc-card-whatsapp * {
    color: #ffffff !important;
    stroke: #ffffff !important;
    background-color: transparent; /* allow outer card to retain its solid green */
    border-color: transparent !important;
  }

  /* Ensure background color specifically remains green for the cards */
  .mb-item:nth-child(1),
  .fc-card-whatsapp .fc-normal,
  .fc-card-whatsapp .fc-hover {
    background-color: #25d366 !important;
  }

  .whatsapp-btn svg,
  .whatsapp-btn svg path,
  .whatsapp-btn svg *,
  .mobile-whatsapp svg,
  .mobile-whatsapp svg path,
  .mobile-whatsapp svg *,
  .floating-whatsapp svg,
  .floating-whatsapp svg path,
  .floating-whatsapp svg *,
  .contact-whatsapp svg,
  .contact-whatsapp svg path,
  .contact-whatsapp svg * {
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none !important;
  }

  .mb-item:active {
    opacity: 0.8 !important;
  }

  .mb-item:nth-child(1) {
    background-color: #25d366 !important;
  } /* WhatsApp */
  .mb-item:nth-child(2) {
    background-color: #223a63 !important;
  } /* Phone */
  .mb-item:nth-child(3) {
    background-color: #c8a35a !important;
  } /* Location */
  .mb-item.mb-totop {
    background-color: #1a2c4e !important;
  } /* Back to Top */

  /* Premium Mobile Typography Refinements (max-width: 767px) */
  h1, .hero-title, .article-hero h1, .legal-hero h1, .page-header h1 {
    font-size: 26px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: -0.01em !important;
    text-wrap: balance !important;
  }

  h2, .section-title, .map-title, .legal-document h2, .article-body h2 {
    font-size: 21px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: -0.01em !important;
    text-wrap: balance !important;
  }

  h3, .article-title, .article-faq-item h3, .article-cta h3, .legal-document h3, .legal-contact-card h3, .article-body h3 {
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    text-wrap: balance !important;
  }

  strong, b, .highlight-text {
    font-weight: 600 !important;
  }
}

/* Mobile Devices (480px and below) */
@media (max-width: 480px) {
  /* Header logo tight optimization */
  .container {
    padding: 0 12px !important;
  }
  .logo {
    gap: 6px !important;
  }
  .logo-icon {
    width: 28px !important;
    height: 28px !important;
  }
  .logo-text h1 {
    font-size: 14px !important;
    white-space: nowrap !important;
  }
  .logo-text span {
    font-size: 9px !important;
    white-space: nowrap !important;
  }

  .hero-title {
    margin-bottom: 12px;
  }

  .hero-text {
    font-size: 13px !important;
    margin-bottom: 20px;
    line-height: 1.5;
  }

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

  .hero-actions .btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }

  .hero-btn-outline {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
  }

  .info-card {
    padding: 24px !important;
  }

  .info-legal-notice {
    margin-top: 18px !important;
    padding-top: 15px !important;
    font-size: 10px !important;
    line-height: 1.5 !important;
    max-width: 100% !important;
  }

  /* Grids */
  .services-grid,
  .features-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Blog Articles */
  .article-hero {
    padding: 80px 0 60px;
    min-height: 35vh;
  }

  .article-hero h1 {
    margin-bottom: 12px;
  }

  .article-hero .meta-info {
    font-size: 14px;
  }

  .article-body-container {
    padding: 40px 20px;
  }

  .article-body {
    font-size: 17px;
    line-height: 1.7;
  }

  .article-body p {
    margin-bottom: 20px;
  }

  .article-body h2 {
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
  }

  .article-body h3 {
    margin-top: 30px;
    margin-bottom: 12px;
  }

  .article-body blockquote {
    font-size: 18px;
    padding: 20px;
    margin: 30px 0;
  }

  .article-faq {
    padding: 24px 20px;
    margin: 40px 0;
  }

  .article-faq-item p {
    font-size: 16px;
  }

  .article-cta {
    padding: 40px 24px;
    margin-top: 50px;
  }

  .article-cta h3 {
    margin-bottom: 16px;
  }

  .article-body-container aside {
    width: 100% !important;
    position: static !important;
    margin-top: 40px;
  }

  /* Back to Top */
  .back-to-top {
    left: auto;
    right: 20px;
    bottom: 130px;
    width: 44px;
    height: 44px;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }

  .premium-stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .premium-stats {
    padding: 15px 0 25px 0 !important;
  }

  .map-subtitle {
    font-size: 16px;
  }
}

/* Small Mobile Devices (375px and below) */
@media (max-width: 375px) {
  h1, .hero-title, .article-hero h1, .legal-hero h1, .page-header h1 {
    font-size: 23px !important;
    line-height: 1.3 !important;
  }
  h2, .section-title, .map-title, .legal-document h2, .article-body h2 {
    font-size: 19px !important;
    line-height: 1.3 !important;
  }
  h3, .article-title, .article-faq-item h3, .article-cta h3, .legal-document h3, .legal-contact-card h3, .article-body h3 {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  .hero-title {
    margin-bottom: 10px;
    font-size: 22px !important;
  }
  .hero-text {
    font-size: 13px !important;
    margin-bottom: 16px;
  }
  .hero-actions .btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  /* Article Fixes for Small Mobile */
  .article-hero .meta-info {
    font-size: 13px;
  }
  .article-body {
    font-size: 16px;
  }
}

/* ==================================================
   LEGAL PAGES RESPONSIVE
   ================================================== */
@media (max-width: 900px) {
  .legal-container {
    padding: 60px 24px;
  }
  .legal-hero {
    padding: 130px 0 80px;
  }
}

@media (max-width: 600px) {
  .legal-hero .legal-subtitle {
    font-size: 15px;
  }
  .legal-document {
    font-size: 16px;
  }
  .legal-document h2 {
    margin: 40px 0 20px;
  }
  .legal-document h3 {
    margin: 30px 0 14px;
  }
  .legal-contact-card {
    padding: 24px;
  }
  .legal-contact-card p {
    font-size: 15px;
    flex-direction: column;
    gap: 4px;
  }
}

/* Mobile Extra-Small Devices Adjustments for Asymmetrical Composition */
@media (max-width: 480px) {
  /* Extra-small screen Top Bar Optimization to prevent wrapping and preserve spacing */
  .top-bar-inner {
    gap: 8px !important;
  }
  .top-socials {
    gap: 8px !important;
  }
  .top-contacts {
    gap: 8px !important;
  }
  .top-socials a,
  .top-contacts a {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }
  .top-contacts a svg,
  .top-socials a svg {
    width: 16px !important;
    height: 16px !important;
  }

  .about-asym-composition {
    height: auto !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
  }
  .about-img-container {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    height: 250px !important;
  }
  .about-img-main {
    height: 320px !important;
    order: 1;
  }
  .about-img-secondary {
    height: 220px !important;
    order: 2;
  }
  .about-img-tertiary {
    height: 220px !important;
    order: 3;
    display: block !important;
  }
  .about-experience-badge,
  .about-overlay-badge,
  .about-association-badge {
    position: absolute !important;
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    transform: scale(0.72) !important;
    transform-origin: bottom center !important;
    padding: 6px 10px !important;
    min-width: auto !important;
    z-index: 6;
  }
  .about-img-container:hover .about-experience-badge,
  .about-img-container:hover .about-overlay-badge,
  .about-img-container:hover .about-association-badge {
    transform: scale(0.72) !important;
  }
  .badge-icon {
    width: 30px !important;
    height: 30px !important;
  }
  .badge-icon svg {
    width: 15px !important;
    height: 15px !important;
  }
  .badge-title {
    font-size: 11px !important;
  }
  .badge-desc {
    font-size: 9px !important;
  }
}

/* FAQ Accordion Responsive */
@media (max-width: 768px) {
  .faq-accordion {
    gap: 12px;
  }
  .faq-accordion-header {
    padding: 16px 20px;
  }
  .faq-accordion-question {
    font-size: 16px;
  }
  .faq-accordion-content {
    padding: 0 20px 20px 20px;
    font-size: 15px;
    padding-top: 16px;
  }
}

