/* ========================================
   MOBILE RESPONSIVE STYLES
   Professional & Modern Mobile Design
   ======================================== */

/* ========================================
   GLOBAL MOBILE STYLES
   ======================================== */

/* Ensure proper box-sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Improve touch targets */
button,
a,
input,
select,
textarea {
    min-height: 44px;
    min-width: 44px;
}

/* ========================================
   TABLET (max-width: 1024px)
   ======================================== */

@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding-left: 30px;
        padding-right: 30px;
    }

    /* Hero sections */
    .hero h1,
    .heros h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: clamp(1.1rem, 3vw, 1.3rem);
    }

    /* Grid layouts */
    .overview-grid,
    .features-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Service cards */
    .service-cards-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ========================================
   MOBILE (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {
    /* Container */
    .container,
    .contain {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Typography */
    h1 {
        font-size: clamp(1.8rem, 6vw, 2.2rem);
        line-height: 1.3;
    }

    h2 {
        font-size: clamp(1.5rem, 5vw, 1.8rem);
        line-height: 1.4;
    }

    h3 {
        font-size: clamp(1.2rem, 4vw, 1.5rem);
    }

    p {
        font-size: clamp(0.95rem, 2.5vw, 1rem);
        line-height: 1.7;
    }

    /* ========== INDEX PAGE ========== */

    /* Hero Section */
    .heros {
        min-height: 70vh;
    }

    .hero-content {
        padding: 40px 20px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 7vw, 2.5rem);
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem);
        margin-bottom: 12px;
    }

    .hero-tagline {
        font-size: clamp(0.85rem, 3vw, 0.95rem);
        margin-bottom: 25px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .hero-buttons .cta-button {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        padding: 14px 28px;
        font-size: 1rem;
    }

    /* Info Box */
    .info-box-bottom {
        position: relative;
        margin-top: -50px;
        padding: 0 15px 30px;
    }

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

    .info-card {
        padding: 25px 20px;
    }

    .card-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    /* Program Overview */
    .program-overview {
        padding: 50px 0;
    }

    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
        margin-bottom: 30px !important;
        padding: 0 15px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }

    .overview-image {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: cover;
    }

    /* Service Cards Grid */
    .service-cards-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 20px;
    }

    .service-card {
        padding: 30px 20px;
    }

    .service-card-image {
        height: 200px;
    }

    .service-card h3 {
        font-size: 1.4rem;
    }

    /* Stats Section */
    .stats-section {
        padding: 50px 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-box {
        padding: 25px 15px;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* ========== SERVICE PAGES ========== */

    /* Service Headers */
    .service-header,
    .overview-section {
        padding: 60px 20px !important;
    }

    /* Unified Benefits Section */
    .unified-benefits-section {
        margin: 40px 15px 0 !important;
        border-radius: 20px;
    }

    .section-header {
        padding: 40px 20px;
    }

    .section-title h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .benefits-container {
        padding: 0;
    }

    .benefit-row {
        flex-direction: column;
        padding: 40px 20px;
    }

    .benefit-content {
        padding: 0;
        order: 2;
    }

    .benefit-visual {
        order: 1;
        height: 250px;
        margin-bottom: 25px;
    }

    .benefit-number {
        font-size: 3rem;
        width: 80px;
        height: 80px;
    }

    .benefit-title {
        font-size: clamp(1.3rem, 4vw, 1.6rem);
    }

    .benefit-features li {
        font-size: 0.95rem;
        padding-left: 25px;
    }

    .benefit-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-value {
        font-size: 2rem;
    }

    /* Visa Section */
    .visa-section {
        padding: 50px 20px;
    }

    .visa-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .visa-card {
        padding: 25px 20px;
    }

    .visa-number {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .visa-card h3 {
        font-size: 1.4rem;
    }

    /* Overview Content Grid */
    .overview-content-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .description-card {
        padding: 25px 20px;
    }

    .card-image {
        height: 200px;
        margin-top: 20px;
    }

    .stats-grid-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-number-overview {
        font-size: 1.5rem;
    }

    /* Overview CTA Banner */
    .overview-cta-banner {
        flex-direction: column;
        padding: 30px 20px;
        text-align: center;
    }

    .cta-badges {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* ========== ABOUT PAGE ========== */

    .about-section {
        padding: 50px 20px;
    }

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

    .about-image {
        height: 250px;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .team-member {
        padding: 25px 20px;
    }

    /* ========== FAQ PAGE ========== */

    .faq-header {
        padding: 60px 20px 40px !important;
    }

    .faq-title {
        font-size: clamp(2rem, 6vw, 2.5rem) !important;
    }

    .faq-subtitle {
        font-size: 1rem !important;
        padding: 0 10px;
    }

    .faq-section {
        padding: 40px 20px 60px;
    }

    .faq-container {
        padding: 0 10px;
    }

    .faq-question {
        padding: 18px 20px !important;
        font-size: 1rem !important;
        flex-wrap: wrap;
    }

    .faq-toggle {
        width: 28px !important;
        height: 28px !important;
        font-size: 1.2rem !important;
    }

    .faq-answer-content {
        padding: 20px !important;
        font-size: 0.95rem !important;
    }

    /* ========== CONTACT PAGE ========== */

    .contact-header {
        padding: 60px 20px !important;
    }

    .contact-header h1 {
        font-size: 2rem !important;
    }

    .contact-content-section {
        padding: 40px 15px 60px;
    }

    .contact-form-wrapper {
        padding: 30px 20px !important;
        margin-bottom: 30px;
    }

    .contact-form-wrapper h2 {
        font-size: 1.5rem !important;
    }

    .form-row {
        flex-direction: column !important;
        gap: 0;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-control {
        padding: 12px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    textarea.form-control {
        min-height: 100px;
    }

    .submit-btn,
    button[type="submit"] {
        padding: 16px 28px;
        font-size: 1rem;
    }

    /* Contact Info Grid */
    .contact-info-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

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

    .info-icon {
        width: 55px;
        height: 55px;
    }

    .info-icon i {
        font-size: 1.3rem;
    }

    .map-container iframe {
        height: 300px;
    }

    /* ========== FOOTER ========== */

    .footer {
        padding: 50px 0 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section {
        padding: 0 20px;
    }

    .footer-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .footer-bottom {
        padding: 20px;
        font-size: 0.9rem;
    }
}

/* ========================================
   SMALL MOBILE (max-width: 480px)
   ======================================== */

@media (max-width: 480px) {
    /* Container */
    .container,
    .contain {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Typography */
    h1 {
        font-size: clamp(1.6rem, 7vw, 2rem);
    }

    h2 {
        font-size: clamp(1.3rem, 6vw, 1.6rem);
    }

    h3 {
        font-size: clamp(1.1rem, 5vw, 1.3rem);
    }

    /* Hero */
    .hero-content {
        padding: 30px 15px;
    }

    .hero-buttons .cta-button {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    /* Cards */
    .info-card,
    .service-card,
    .visa-card,
    .description-card {
        padding: 20px 15px;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid-overview {
        grid-template-columns: 1fr;
    }

    /* Benefit Stats */
    .benefit-stats {
        gap: 15px;
    }

    .stat-item {
        padding: 15px;
    }

    /* Form */
    .contact-form-wrapper {
        padding: 25px 15px !important;
    }

    .form-control {
        padding: 10px 12px;
    }

    /* Footer */
    .footer-section {
        padding: 0 15px;
    }

    .footer-bottom p {
        font-size: 0.85rem;
    }

    /* Buttons */
    .btn,
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Service Card Images */
    .service-card-image {
        height: 180px;
    }

    /* Benefit Visual */
    .benefit-visual {
        height: 200px;
    }
}

/* ========================================
   LANDSCAPE MODE (Mobile Landscape)
   ======================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .heros,
    .hero {
        min-height: 100vh;
    }

    .hero-content {
        padding: 20px;
    }

    .info-box-bottom {
        position: relative;
        margin-top: 20px;
    }
}

/* ========================================
   UTILITY CLASSES FOR MOBILE
   ======================================== */

/* Hide on mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }
}

/* Show only on mobile */
@media (min-width: 769px) {
    .show-mobile {
        display: none !important;
    }
}

/* Improve touch scrolling */
.scrollable {
    -webkit-overflow-scrolling: touch;
}

/* Prevent text selection on buttons */
button,
.btn,
.cta-button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

/* Improve image performance */
img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus states for keyboard navigation */
@media (max-width: 768px) {
    a:focus,
    button:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }

    /* Skip to main content link */
    .skip-to-main {
        position: absolute;
        top: -100px;
        left: 0;
        background: #3b82f6;
        color: white;
        padding: 10px 20px;
        text-decoration: none;
        z-index: 10000;
    }

    .skip-to-main:focus {
        top: 0;
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Reduce animations on mobile for better performance */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
