/* ==========================================================================
   MARK INTERNATIONAL ADVISERS — COMPREHENSIVE RESPONSIVE SYSTEM
   Flawless mobile, tablet, and phone optimization
   Breakpoints: 1200px | 1024px | 768px | 480px | 375px | 320px
   ========================================================================== */

/* --- ROOT & GLOBAL MOBILE PREVENTIONS --- */
html, body {
  overflow-x: clip;
  max-width: 100%;
}

img, svg, video, iframe, canvas {
  max-width: 100%;
  height: auto;
}

iframe {
  height: auto;
  min-height: 220px;
}

/* Touch devices: never hide destination copy behind hover */
@media (hover: none) {
  .dest-features-preview {
    opacity: 1;
    max-height: 90px;
    margin-bottom: 0.8rem;
  }

  .destination-card:hover,
  .service-card:hover,
  .invitation-photo-card:hover,
  .why-card:hover,
  .value-card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* Tight laptop header: keep lockup + nav balanced */
@media (max-width: 1180px) and (min-width: 769px) {
  .nav-actions .btn-outline-gold {
    display: none;
  }

  .mobile-links-container {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .brand-title {
    font-size: 1.05rem;
  }
}

/* --- LARGE SCREENS & DESKTOP (max-width: 1200px) --- */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 2.85rem;
  }
  
  .destinations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .invitations-photo-grid,
  .invitations-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* --- TABLETS & MEDIUM SCREENS (max-width: 1024px) --- */
@media (max-width: 1024px) {
  .top-bar-tagline {
    display: none;
  }

  .top-bar-left {
    gap: 1rem;
  }
  
  .hero-section {
    padding: 3.5rem 0 4.5rem;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-content {
    max-width: 100%;
    text-align: center;
  }
  
  .hero-motto-callout {
    justify-content: center;
    border-left: none;
    border-bottom: 3px solid var(--gold);
    border-radius: var(--radius-sm);
  }
  
  .hero-cta-group {
    justify-content: center;
  }
  
  .hero-trust-bar {
    justify-content: center;
  }
  
  .hero-card-stack {
    max-width: 520px;
    margin: 0 auto;
  }
  
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .intro-image-frame {
    order: 2;
    max-width: 580px;
    margin: 0 auto;
  }
  
  .intro-content {
    order: 1;
  }
  
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .pillar-item:not(:first-child) {
    border-left: none;
    border-top: 1px solid var(--border-light);
    padding-top: 1.25rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .process-timeline {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 2.5rem;
  }
  
  .process-timeline::before {
    display: none;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2.5rem;
  }

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

/* --- MOBILE DRAWER & TABLET PORTRAIT (max-width: 768px) --- */
@media (max-width: 768px) {
  /* Header & Navigation */
  .main-header {
    padding: 0.65rem 0;
    /* Remove backdrop-filter so position:fixed drawer is relative to viewport (not clipped by header stacking context) */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #ffffff;
  }

  .brand-logo-frame {
    width: 46px;
    height: 46px;
    border-radius: 10px;
  }

  .brand-title {
    font-size: 1.1rem;
  }

  .brand-tagline-badge {
    display: none;
  }

  .drawer-header {
    display: flex;
  }

  .drawer-contact-card {
    display: block;
  }

  .drawer-actions-stack {
    display: flex;
    flex-direction: column;
  }

  .mobile-links-container {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
  }

  .nav-link i {
    display: inline-flex;
    width: 20px;
    color: var(--gold);
    font-size: 1.05rem;
    align-items: center;
    justify-content: center;
  }

  .brand-subtitle {
    font-size: 0.65rem;
  }

  .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .nav-actions .btn {
    display: none; /* Replaced by mobile quick action pill */
  }

  /* Quick WhatsApp Pill on Mobile Header */
  .mobile-quick-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    text-decoration: none;
    transition: transform var(--transition-fast);
  }

  .mobile-quick-wa:hover,
  .mobile-quick-wa:active {
    transform: scale(1.08);
  }

  /* Modern Hamburger Menu Button */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid var(--border-gold);
    background: #ffffff;
    color: var(--primary);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-fast);
  }

  .menu-toggle:hover,
  .menu-toggle:active {
    background: var(--primary-tint);
    border-color: var(--gold);
  }

  /* Mobile Slide-in Drawer */
  .desktop-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 35px rgba(34, 5, 12, 0.3);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 1.5rem 2rem;
    gap: 0;
    z-index: 1010;
    transition: right 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
  }
  
  .desktop-nav.mobile-open {
    right: 0;
    pointer-events: auto;
  }

  /* Drawer Internal Header */
  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
  }

  .drawer-brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .drawer-logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border-gold);
    padding: 2px;
    background: #fff;
  }

  .drawer-brand-text h4 {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
  }

  .drawer-brand-text span {
    font-size: 0.65rem;
    color: var(--gold-dark);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .drawer-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
  }

  .drawer-close-btn:hover {
    background: var(--primary);
    color: #fff;
  }

  /* Drawer Navigation Links */
  .mobile-links-container {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
  }
  
  .nav-link {
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
    border-bottom: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
    transition: all var(--transition-fast);
  }

  .nav-link i {
    width: 20px;
    color: var(--gold);
    font-size: 1.05rem;
  }

  .nav-link:hover,
  .nav-link.active {
    background: var(--primary-tint);
    color: var(--primary);
    transform: translateX(4px);
  }

  .nav-link::after {
    display: none;
  }

  /* Drawer Contact Card */
  .drawer-contact-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: auto;
    margin-bottom: 1.2rem;
  }

  .drawer-contact-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.6rem;
  }

  .drawer-contact-row:last-child {
    margin-bottom: 0;
  }

  .drawer-contact-row i {
    color: var(--gold);
    font-size: 1rem;
  }

  .drawer-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .drawer-actions-stack .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }
  
  /* Mobile Backdrop Overlay – very light, no blur, page stays clear & clickable behind menu */
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(18, 14, 16, 0.22);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    pointer-events: auto;
  }
  
  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Hero Section Adjustments */
  .hero-section {
    padding: 1.75rem 0 2.5rem;
  }

  .hero-badge-container {
    margin-bottom: 0.75rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
    white-space: normal;
    text-align: center;
  }

  .hero-title {
    font-size: 2.05rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }
  
  .hero-desc {
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 1.2rem;
  }

  .hero-motto-callout {
    padding: 0.55rem 0.9rem;
    margin-bottom: 1.2rem;
    font-size: 0.82rem;
  }
  
  .hero-trust-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding-top: 1.5rem;
  }

  .trust-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
  }
  
  .floating-glass-card {
    display: none;
  }

  .hero-main-card {
    padding: 1.5rem;
  }
  
  /* Content Sections */
  .section-title {
    font-size: 1.95rem;
    line-height: 1.25;
  }

  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.4rem;
  }
  
  .section-padding {
    padding: 2.25rem 0;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .destinations-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .invitations-photo-grid,
  .invitations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .invitations-banner {
    padding: 1.25rem;
    margin-top: 1.75rem;
  }
  
  .why-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* ===== HOMEPAGE COMPACT MODE (mobile) ===== */
  /* Hide secondary long sections so the page is brief and scannable */
  .process-section {
    display: none !important;
  }
  .trust-pillars-section {
    display: none !important;
  }
  /* Keep core sections but much tighter */
  .section-padding {
    padding: 1.75rem 0 !important;
  }
  .hero-section {
    padding: 1.5rem 0 2rem !important;
    min-height: auto !important;
  }
  .hero-title {
    font-size: 1.85rem !important;
    margin-bottom: 0.6rem !important;
  }
  .hero-desc {
    font-size: 0.88rem !important;
    margin-bottom: 1rem !important;
  }
  .hero-motto-callout {
    margin-bottom: 1rem !important;
  }
  .hero-cta-group {
    margin-bottom: 1.25rem !important;
  }
  .hero-trust-bar {
    padding-top: 1rem !important;
    gap: 0.6rem !important;
  }
  .section-title {
    font-size: 1.7rem !important;
    margin-bottom: 0.6rem !important;
  }
  .section-subtitle {
    font-size: 0.9rem !important;
    margin-bottom: 1.1rem !important;
  }
  .service-card-top {
    height: 140px !important;
  }
  .destination-card {
    height: 260px !important;
  }
  /* invitations-banner kept visible – now placed first on homepage */
  .invitations-banner {
    margin-bottom: 1.5rem;
  }
  .why-card {
    padding: 1.4rem 1.2rem !important;
  }
  .cta-section {
    padding: 2.5rem 0 !important;
  }
  .cta-content h2 {
    font-size: 1.7rem !important;
  }
  .intro-main-img {
    height: 220px !important;
  }

  
  .process-timeline {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    margin-top: 1.75rem;
  }
  
  .process-step {
    flex-direction: row;
    text-align: left;
    gap: 1.1rem;
    align-items: flex-start;
  }
  
  .step-number-wrap {
    width: 48px;
    height: 48px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .step-num {
    font-size: 1.15rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-group.full-width {
    grid-column: span 1;
  }

  /* Prevent iOS zoom on inputs */
  .form-control {
    font-size: 16px !important;
    padding: 0.85rem 1rem;
    min-height: 48px;
  }
  
  .contact-form-card {
    padding: 2rem 1.25rem;
  }
  
  .contact-info-panel {
    padding: 2rem 1.25rem;
  }
  
  .values-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-content h2 {
    font-size: 2.1rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom-bar {
    flex-direction: column;
    gap: 0.85rem;
    text-align: center;
  }
}

/* --- SMALL SMARTPHONES (max-width: 480px) --- */
@media (max-width: 480px) {
  .top-bar {
    display: none; /* Hide top utility strip on phones for cleaner screen */
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .brand-logo-frame {
    width: 40px;
    height: 40px;
    padding: 3px;
  }
  
  .brand-title {
    font-size: 0.98rem;
    letter-spacing: -0.01em;
  }
  
  .brand-subtitle {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }

  .brand-logo-link {
    gap: 0.55rem;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-desc {
    font-size: 0.9rem;
  }
  
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.85rem;
  }
  
  .hero-cta-group .btn {
    width: 100%;
    min-height: 48px;
  }

  /* Quicklist on small phones */
  .quicklist-item {
    padding: 0.65rem 0.8rem;
  }

  .quicklist-thumb-wrap {
    width: 38px;
    height: 38px;
  }

  .quicklist-info h5 {
    font-size: 0.82rem;
  }

  .quicklist-info span {
    font-size: 0.68rem;
  }
  
  /* Invitations photo grid becomes single column or clean 2-col */
  .invitations-photo-grid,
  .invitations-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .invitation-card-media {
    height: 160px;
  }
  
  .invitations-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .schengen-countries-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .intro-main-img {
    height: 280px;
  }
  
  .intro-accent-box {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 1rem;
    max-width: 100%;
    padding: 1.2rem;
  }

  .destination-card {
    height: 250px;
  }
  
  /* Floating Action Buttons */
  .floating-actions {
    bottom: 1rem;
    right: 1rem;
    gap: 0.65rem;
  }
  
  .fab-btn {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
  
  .fab-tooltip {
    display: none;
  }
  
  .back-to-top {
    left: 1rem;
    bottom: 1rem;
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }

  .filter-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
  }

  .filter-btn {
    flex-shrink: 0;
  }

  .dual-country-media img {
    height: 240px;
  }

  .filter-btn {
    padding: 0.5rem 0.95rem;
    font-size: 0.8rem;
  }
}

/* --- EXTRA NARROW SCREENS (max-width: 375px) --- */
@media (max-width: 375px) {
  .hero-title {
    font-size: 1.6rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .brand-title {
    font-size: 0.92rem;
  }

  .brand-title {
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .brand-subtitle {
    font-size: 0.54rem;
    letter-spacing: 0.08em;
  }

  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .hero-main-card {
    padding: 1.15rem 0.95rem;
  }

  .quicklist-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
  }

  .page-hero-title {
    font-size: 1.55rem;
  }
}

@media (max-width: 430px) {
  .destination-card {
    height: 240px;
  }

  .cta-action-buttons .btn {
    width: 100%;
    min-height: 48px;
  }

  .dual-country-media img,
  .intro-main-img {
    height: 220px;
  }

  .contact-map-wrap iframe {
    height: 280px;
  }
}

@media (max-width: 390px) {
  .hero-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
  }

  .section-padding {
    padding: 1.5rem 0;
  }
}

@media (max-width: 360px) {
  .brand-logo-frame {
    width: 36px;
    height: 36px;
  }

  .hero-title {
    font-size: 1.48rem;
  }

  .invitations-photo-grid,
  .invitations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 320px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .brand-title {
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   HOMEPAGE – FORCE BRIEF LAYOUT ON MOBILE / TABLET
   Makes the home page noticeably shorter by hiding secondary blocks
   and tightening spacing. Desktop is unchanged.
   ========================================================================== */
@media (max-width: 1024px) {
  .home-page .process-section,
  .home-page .trust-pillars-section {
    display: none !important;
  }
  /* Visit Visa banner is now shown first – keep it visible */
  .home-page .invitations-banner {
    display: block !important;
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
  }

  .home-page .section-padding {
    padding: 1.6rem 0 !important;
  }

  .home-page .hero-section {
    padding: 1.4rem 0 1.8rem !important;
    min-height: 0 !important;
  }

  .home-page .hero-title {
    font-size: 1.9rem !important;
    margin-bottom: 0.5rem !important;
  }

  .home-page .hero-desc {
    font-size: 0.9rem !important;
    margin-bottom: 0.9rem !important;
    line-height: 1.5 !important;
  }

  .home-page .hero-motto-callout,
  .home-page .hero-cta-group {
    margin-bottom: 0.9rem !important;
  }

  .home-page .hero-trust-bar {
    padding-top: 0.85rem !important;
    gap: 0.5rem !important;
  }

  .home-page .section-title {
    font-size: 1.65rem !important;
    margin-bottom: 0.5rem !important;
  }

  .home-page .section-subtitle {
    font-size: 0.88rem !important;
    margin-bottom: 1rem !important;
  }

  .home-page .service-card-top {
    height: 130px !important;
  }

  .home-page .destination-card {
    height: 240px !important;
  }

  .home-page .intro-main-img {
    height: 200px !important;
  }

  .home-page .why-card {
    padding: 1.25rem 1.1rem !important;
  }

  .home-page .cta-section {
    padding: 2.2rem 0 !important;
  }

  .home-page .cta-content h2 {
    font-size: 1.6rem !important;
  }

  /* Show only first 3 service cards on mobile home to reduce length */
  .home-page .services-grid .service-card:nth-child(n+4) {
    display: none !important;
  }

  /* Show only first 4 destination cards on mobile home */
  .home-page .destinations-grid .destination-card:nth-child(n+5) {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .home-page .section-padding {
    padding: 1.35rem 0 !important;
  }
  .home-page .hero-title {
    font-size: 1.7rem !important;
  }
  .home-page .destination-card {
    height: 220px !important;
  }
}

/* CEO card responsive */
@media (max-width: 768px) {
  .ceo-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.35rem;
    text-align: center;
  }

  .ceo-photo-wrap {
    max-width: 260px;
    margin: 0 auto;
    aspect-ratio: 4 / 5;
  }

  .ceo-highlights {
    justify-content: center;
  }

  .ceo-name {
    font-size: 1.55rem;
  }

  .ceo-bio {
    font-size: 0.9rem;
  }
}

@media (max-width: 1024px) {
  .about-dest-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .about-dest-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-dest-item {
    height: 110px;
  }
}

@media (max-width: 900px) {
  .review-card {
    flex: 0 0 calc(50% - 0.65rem);
  }
}

@media (max-width: 600px) {
  .review-card {
    flex: 0 0 100%;
    min-width: 0;
  }
  .reviews-nav {
    width: 38px;
    height: 38px;
  }
  .success-stat strong {
    font-size: 1.6rem;
  }
}
