/* --- Responsive Adjustments --- */

/* טאבלטים ומסכים בינוניים (Large Mobile & Tablets) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero-content h1 {
        font-size: 3.2rem;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* סמארטפונים (Mobile Portait) */
@media (max-width: 768px) {
    /* Hero Section */
    .hero {
        height: 400px; /* קיצור גובה ההירו למובייל */
    }

    .hero-content h1 {
        font-size: 2.2rem;
        padding: 0 10px;
    }

    .logo-wrapper {
        top: 20px;
        right: 20px;
    }

    .main-logo {
        height: 45px;
    }

    /* Sections */
    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    /* Grids to Single Column */
    .intro-grid, 
    .proc-grid, 
    .links-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Cards Adjustment */
    .premium-card {
        padding: 25px;
        flex-direction: column;
        text-align: center;
    }

    .card-num {
        margin-left: 0;
        margin-bottom: 15px;
    }

    /* Procedures */
    .proc-column {
        padding: 10px 0;
    }

    .proc-column h3 {
        font-size: 1.2rem;
    }

    /* Map Overlay - התאמה קריטית למובייל */
    .map-section {
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .map-container iframe {
        height: 300px; /* הקטנת המפה במובייל */
    }

    .map-overlay {
        position: relative; /* הפיכת המידע לחלק מהזרימה של הדף במקום צף */
        top: 0;
        padding: 20px;
        background: var(--bg-light);
    }

    .contact-box {
        width: 100%;
    }

    .overlay-card {
        padding: 15px;
    }

    /* Footer */
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .footer-links a {
        margin: 0;
    }
}

/* מסכים קטנים במיוחד */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .intro-description {
        font-size: 1rem;
        line-height: 1.6;
    }
}


/* התאמה למובייל */
@media (max-width: 992px) {
    .contact-wrapper { flex-direction: column-reverse; }
    .contact-info-side { height: 400px; }
    .info-title { font-size: 2.5rem; }
}

/* --- Responsive Logic --- */

/* Tablet & Smaller Desktops (Under 1024px) */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 56px; /* Scaled down from 72px */
    }
    
    .hero-container {
        padding: 0 30px;
        margin-bottom: 80px;
    }
}

/* Mobile Devices (Under 768px) */
@media (max-width: 768px) {
    /* Header Adjustments */
    .header-content-wrapper {
        flex-direction: column-reverse; /* Stacks logo above text */
        gap: 12px;
        text-align: center;
    }

    .header-text {
        text-align: center;
        align-items: center;
    }

    .header-text .line-1 { font-size: 1.3rem; }
    .header-text .line-2 { font-size: 1.1rem; }
    .header-logo img { height: 48px; }

    /* Hero Adjustments */
    .hero-section {
        height: 300px; /* Reduced height for mobile */
    }

    .hero-overlay {
        background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
        justify-content: center; /* Center text on mobile */
    }

    .hero-container {
        padding: 0 20px;
        margin-bottom: 40px;
         /* Centered alignment for mobile aesthetics */
    }

    .hero-title {
        font-size: 38px; /* Mobile friendly scale */
        line-height: 1.2;
    }
    .premium-card p {
        font-size: 1.3rem;
        text-align: start;
    }
}

/* Small Mobile (Under 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }
    
    .header-text .line-1 { font-size: 1.1rem; }
    .header-text .line-5 { font-size: 0.9rem; }
}

/* --- Gallery Responsive Logic --- */

@media (max-width: 1680px) {
    .swiper-slide img {
        height: 400px; /* Slightly shorter for tablets */
    }

    .gallery-footer-nav {
        max-width: 90%; /* Allow more width on tablets */
        top: 0;
        margin-top: 50px;
    }
}

@media (max-width: 1024px) {
    .swiper-slide img {
        height: 250px; /* Slightly shorter for tablets */
    }
}

@media (max-width: 768px) {
    .mySwiper {
        padding: 20px 0 0;
    }

    .swiper-slide img {
        height: 300px; /* Optimized for mobile aspect ratios */
    }

    .gallery-footer-nav {
        max-width: 100%;
        padding: 0 20px;
        justify-content: center; /* Center arrows on mobile for better UX */
        gap: 20px;
         /* Move arrows below the image comfortably */
        top: 0;
        margin-top: 50px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 44px !important; /* Standard mobile touch target size */
        height: 44px !important;
    }
}

@media (max-width: 480px) {
    .swiper-slide img {
        height: 250px; /* Small phones */
    }
    
    .slide-caption h3 {
        font-size: 1.1rem; /* Adjusting the caption size built previously */
    }
}

/* --- FAQ Responsive Logic --- */

@media (max-width: 1024px) {
    .faq-header {
        font-size: 26px; /* Scaled down for tablets */
        padding: 20px 0;
    }
}

@media (max-width: 768px) {
    .faq-header {
        font-size: 22px; /* Mobile-friendly size */
        padding: 18px 0;
        line-height: 1.3;
        gap: 15px; /* Ensures space between text and the icon */
    }

    .faq-content {
        font-size: 18px; /* Slightly smaller for density */
        padding: 0 10px; /* Reduced side padding */
    }

    .faq-item.active .faq-content {
        max-height: 500px; /* Increased to accommodate wrapped text on narrow screens */
        padding: 15px 0 25px;
    }
}

@media (max-width: 480px) {
    .faq-header {
        font-size: 19px; /* Extra scaling for small phones */
        text-align: right;
    }

    .faq-content {
        font-size: 16px;
    }
}

/* --- Contact Section Responsive Logic --- */

@media (max-width: 1200px) {
    .contact-wrapper {
        justify-content: center;
    }
    
    .contact-info-side {
        width: 50%; /* Shift from fixed 700px to percentage */
    }
    
    .contact-form-side {
        width: 50%; /* Shift from fixed 500px to percentage */
        padding: 40px;
    }

    .info-title { font-size: 2.8rem; }
    .form-main-title { font-size: 2.5rem; }
}

@media (max-width: 992px) {
    .contact-wrapper {
        flex-direction: column; /* Stacks Form on top, Image on bottom */
        min-height: auto;
    }

    .contact-info-side, 
    .contact-form-side {
        width: 100%; /* Full width on mobile */
        max-width: 100%;
    }

    .contact-info-side {
        height: 400px; /* Fixed height for the image part on mobile */
    }

    .contact-form-side {
        align-items: center; /* Center form content for mobile UX */
        padding: 60px 20px;
    }

    .contact-form {
        max-width: 100%;
    }

    .form-main-title {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .form-main-title { font-size: 2.2rem; }
    .info-title { font-size: 2.2rem; }
    
    .info-overlay {
        padding: 20px;
    }

    .detail-row {
        font-size: 1rem;
        gap: 8px;
    }

    .submit-btn {
        width: 100%; /* Full width button for easier thumb-tapping */
        text-align: center;
    }
}

/* --- Content Columns Responsive Logic --- */

/* טאבלטים ומסכים בינוניים (מתחת ל-1024px) */
@media (max-width: 1024px) {
    .links-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* עוברים מ-4 טורים ל-2 */
        gap: 15px;
    }
}

/* סמארטפונים (מתחת ל-768px) */
@media (max-width: 768px) {
    /* גריד המבוא והכרטיסיות הכהות */
    .intro-grid {
        grid-template-columns: 1fr !important; /* טור אחד בלבד */
        gap: 20px;
    }

    .premium-card {
        min-height: auto; /* מאפשר לכרטיסייה לגדול לפי הטקסט */
        padding: 30px 20px;
    }

    /* גריד הנהלים והרשימות */
    .proc-grid {
        grid-template-columns: 1fr !important; /* טור אחד */
        gap: 40px;
    }

    /* כותרות משנה בתוך הטורים */
    .proc-column h3 {
        
         /* ממרכזים כותרות במובייל למראה מאוזן */
    }

    .proc-column ul {
        padding-right: 10px; /* צמצום פאדינג לרשימות */
    }

    /* גריד הקישורים בתחתית */
    .links-grid {
        grid-template-columns: 1fr !important; /* טור אחד רחב ונוח ללחיצה */
    }

    .link-card {
        flex-direction: row; /* בטלפון לפעמים נוח יותר אייקון לצד הטקסט */
        justify-content: flex-start;
        padding: 20px;
        text-align: right;
    }
    
    .link-card i {
        margin-bottom: 0;
        margin-left: 15px; /* רווח בין האייקון לטקסט ב-RTL */
        font-size: 1.4rem;
    }
}

/* מסכים קטנים מאוד (מתחת ל-480px) */
@media (max-width: 480px) {
    .section-title {
        font-size: 28px !important; /* הקטנת כותרות ראשיות למניעת שבירת מילים */
    }

    .intro-description {
        font-size: 16px;
        line-height: 1.5;
    }
}