/* Responsive Design */

/* Large screens */
@media (min-width: 1100px) {
    .pen { 
        max-width: 1100px; 
    }
    
    .stage { 
        height: 520px; 
    }
    
    .element { 
        width: 330px; 
    }
    
    .element.active { 
        width: 520px; 
    }
    
    .element.inactive { 
        width: 220px; 
    }
}

/* Tablet */
@media (max-width: 768px) {
    /* Typography adjustments */
    .hero-text h1 {
        font-size: 48px;
        line-height: 56px;
    }

    /* Hide language toggle on very small screens */
    .lang-toggle {
        display: none;
    }

    /* Mobile navigation */
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 16px;
        background: rgba(0, 0, 0, 0.9);
        padding: 12px;
        border-radius: 8px;
        flex-direction: column;
        gap: 8px;
        align-items: flex-end;
        min-width: 180px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        list-style: none;
    }

    .nav-links a {
        display: block;
        padding: 10px 12px;
    }

    .nav-links .cta-btn {
        padding: 8px 20px;
        margin: 6px 0;
    }

    /* Layout adjustments */
    .feature-row {
        flex-direction: column;
    }

    .service-item {
        flex-direction: column;
        gap: 30px;
        padding: 30px 20px;
    }

    .values-images {
        flex-direction: column;
    }

    .value-cards {
        flex-direction: column;
    }

    .values-header {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    /* Contact form adjustments */
    .contact-section .row {
        flex-direction: column;
        gap: 24px;
    }
    
    .contact-section .col-lg-7,
    .contact-section .col-lg-6,
    .contact-section .col-md-12 {
        width: 100%;
        max-width: 100%;
    }

    .contact-section form {
        padding-right: 0;
        border-right: none;
    }

    .contact-section .form-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "company"
            "fname"
            "lname"
            "email"
            "phone"
            "message";
        gap: 12px;
    }

    .contact-section .btn-primary {
        width: 100%;
        text-align: center;
    }
    
    /* RTL contact section adjustments for mobile and tablet screens */
    html[dir="rtl"] .contact-section .row {
        flex-direction: column !important;
        gap: 30px;
    }
    
    html[dir="rtl"] .contact-section .col-lg-6 {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        flex: none !important;
    }

    /* FAQ adjustments */
    .accordion-trigger ul {
        display: none;
    }

    /* Team page adjustments */
    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-hero h1 {
        font-size: 36px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small mobile */
@media (max-width: 660px) {
    /* Slider adjustments */
    .pen {
        max-width: 100%;
        padding: 0 8px;
    }
    
    .stage {
        height: 260px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    
    .element {
        width: 220px;
        margin-right: 12px;
        scroll-snap-align: center;
    }
    
    .element.active {
        width: 240px;
    }
    
    .element.inactive {
        width: 200px;
        opacity: 0.8;
    }
    
    .slide-caption { 
        font-size: 12px; 
        left: 8px; 
        right: 8px; 
        bottom: 8px; 
        padding: 8px; 
    }

    /* Typography */
    .hero-text h1 {
        font-size: 36px;
        line-height: 42px;
    }

    .feature-header h2,
    .service-left h3 {
        font-size: 28px;
        line-height: 36px;
    }

    /* Spacing adjustments */
    section {
        padding: 60px 16px;
    }

    .container {
        padding: 0 12px;
    }

    /* Button adjustments */
    .btn-group {
        flex-direction: column;
        gap: 15px;
    }

    .cta-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    /* Team stats on mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .lang-toggle {
        display: none;
    }

    /* Hero adjustments */
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 80px 16px 40px;
    }

    .social-sidebar {
        display: none;
    }

    /* Form grid adjustments */
    .contact-section .form-grid {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "company"
            "fname" 
            "lname" 
            "email" 
            "phone" 
            "message";
    }

    /* RTL adjustments for extra small screens */
    html[dir="rtl"] .contact-section .row {
        flex-direction: column !important;
        gap: 20px;
    }
    
    html[dir="rtl"] .puzzle-container {
        margin: 0 auto !important;
        padding: 15px !important;
    }

    /* Team member cards */
    .team-member {
        padding: 20px;
    }

    .member-photo {
        width: 120px;
        height: 120px;
    }
}

/* Extra large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    .hero-content {
        max-width: 1400px;
    }

    .hero-text h1 {
        font-size: 84px;
        line-height: 94px;
    }
}

/* Print styles */
@media print {
    .hero-video,
    .video-overlay-controls,
    .hamburger,
    .lang-toggle {
        display: none !important;
    }

    .hero-section {
        background: var(--primary-color);
        color: var(--text-on-colored);
    }

    body {
        color: var(--text-white);
        background: var(--light-bg);
    }

    .nav-links {
        display: flex !important;
        position: static;
        background: transparent;
        flex-direction: row;
    }
}