/* ========================================
   Responsive Styles
   Mobile-First Approach
   ======================================== */

/* ========================================
   Large Desktop (1440px+)
   ======================================== */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* ========================================
   Desktop (1024px - 1439px)
   ======================================== */
@media (max-width: 1439px) {
    .container {
        max-width: 1100px;
    }
}

/* ========================================
   Tablet & Small Desktop (768px - 1023px)
   ======================================== */
@media (max-width: 1023px) {
    :root {
        --spacing-xxl: 4rem;
        --spacing-xl: 3rem;
        --spacing-lg: 2.5rem;
    }
    
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    /* Header */
    .navbar-actions .consultation-btn {
        display: none;
    }
    
    .phone-link span {
        display: none;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-stats {
        gap: var(--spacing-md);
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Pain Points Grid */
    .pain-points-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Advantages Grid */
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        flex-direction: row;
    }
    
    /* Process Timeline */
    .process-step {
        grid-template-columns: 60px 1fr 60px;
        gap: var(--spacing-sm);
        padding: var(--spacing-md);
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }
    
    .step-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Why Us */
    .why-us-content {
        gap: var(--spacing-lg);
    }
    
    .why-us-image {
        height: 400px;
    }
    
    .image-placeholder i {
        font-size: 4rem;
    }
    
    .image-placeholder p {
        font-size: 1.25rem;
    }
    
    /* Contact */
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    /* Contacts Section */
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item-map {
        grid-column: span 1;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Chatbot */
    .chatbot-window {
        width: 360px;
        height: 500px;
    }
    
    /* Testimonials */
    .testimonials-slider {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Mobile (768px and below)
   ======================================== */
@media (max-width: 767px) {
    :root {
        --spacing-xxl: 3rem;
        --spacing-xl: 2.5rem;
        --spacing-lg: 2rem;
        --spacing-md: 1.5rem;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Buttons */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Header */
    .header {
        height: 70px;
        display: flex;
        align-items: center;
    }
    
    .navbar {
        padding: 0;
        width: 100%;
    }
    
    .navbar-brand {
        gap: var(--spacing-xs);
        z-index: 1001;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .logo-image {
        height: 70px;
    }
    
    .company-name {
        font-size: 0.875rem;
    }
    
    .mobile-break {
        display: block;
    }
    
    /* Fixed Bottom Button */
    .fixed-bottom-btn {
        bottom: 1rem;
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        max-width: calc(100% - 2rem);
    }
    
    .fixed-bottom-btn span {
        max-width: 250px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mobile-menu-toggle {
        display: flex;
        margin-right: 0;
        margin-left: 1.5rem;
    }
    
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-md);
        transform: translateY(-120%);
        transition: var(--transition-normal);
        z-index: 999;
        height: auto;
    }
    
    .navbar-menu.active {
        transform: translateY(0);
    }
    
    .nav-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid var(--gold-light);
        display: block;
        width: 100%;
    }
    
    .navbar-actions {
        gap: var(--spacing-sm);
        z-index: 1001;
        margin-right: var(--spacing-lg);
    }
    
    .phone-link {
        position: absolute;
        right: 60px;
    }
    
    .phone-link span {
        display: none;
    }
    
    .social-link {
        font-size: 1.5rem;
    }
    
    .consultation-btn {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        top: 13px;
        transform: rotate(45deg);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        top: 13px;
        transform: rotate(-45deg);
    }
    
    /* Hero */
    .hero {
        min-height: 100vh;
        min-height: -webkit-fill-available; /* Safari/iPhone support */
        padding: 5px 0 40px;
        display: flex;
        align-items: flex-start;
        padding-top: 140px;
        justify-content: space-between;
    }
    
    .hero-content {
        padding: 0;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: calc(100vh - 180px);
        min-height: calc(-webkit-fill-available - 180px);
    }
    
    .container {
        padding: 0 1rem !important;
        max-width: 100% !important;
    }
    
    .hero-tagline {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
        margin-bottom: 0;
        flex-grow: 0.5;
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.3;
        margin-top: 0;
        margin-bottom: 0;
        flex-grow: 1.5;
        display: flex;
        align-items: center;
        justify-content: center;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
        margin-bottom: 0;
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.5;
        word-wrap: break-word;
    }
    
    .btn-hero {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        margin-bottom: 0;
        flex-grow: 0.5;
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        white-space: normal;
        align-self: center;
    }
    
    .hero-stats {
        flex-wrap: nowrap;
        gap: 1.5rem;
        justify-content: space-between;
        overflow-x: auto;
        align-items: flex-start;
        margin-top: 0;
        flex-grow: 1;
        display: flex;
        align-items: flex-start;
        padding-top: var(--spacing-md);
    }
    
    .stat-item {
        flex-shrink: 0;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.95rem;
    }
    
    /* Sections */
    section {
        padding: var(--spacing-xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-lg);
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Pain Points */
    .pain-points .section-title {
        font-size: 1.75rem;
    }
    
    .pain-points-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .pain-card {
        padding: var(--spacing-md);
    }
    
    .pain-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .pain-title {
        font-size: 1.125rem;
    }
    
    .pain-text {
        font-size: 0.9rem;
    }
    
    .pain-cta {
        padding: var(--spacing-lg);
    }
    
    .pain-cta-text {
        font-size: 1.125rem;
    }
    
    .pain-cta .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Advantages */
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .advantage-card {
        padding: var(--spacing-md);
    }
    
    .advantage-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .service-card {
        padding: var(--spacing-md);
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        min-width: 60px;
        font-size: 1.5rem;
    }
    
    .service-content {
        width: 100%;
    }
    
    /* Process */
    .process-timeline {
        gap: var(--spacing-md);
    }
    
    .process-step {
        grid-template-columns: 50px 1fr;
        grid-template-rows: auto auto;
        gap: var(--spacing-sm);
        padding: var(--spacing-md);
    }
    
    .process-step:not(:last-child)::after {
        left: 25px;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.125rem;
        grid-row: 1;
    }
    
    .step-content {
        grid-column: 2;
        grid-row: 1;
    }
    
    .step-icon {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        height: 60px;
        border-radius: var(--radius-md);
        margin-top: var(--spacing-sm);
    }
    
    .step-title {
        font-size: 1.125rem;
    }
    
    .step-text {
        font-size: 0.9rem;
    }
    
    /* Why Us */
    .why-us-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .why-us-text .section-title {
        text-align: center;
    }
    
    .why-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-md);
    }
    
    .why-item i {
        font-size: 2rem;
    }
    
    .why-us-image {
        height: 300px;
    }
    
    .image-placeholder i {
        font-size: 3rem;
    }
    
    .image-placeholder p {
        font-size: 1.125rem;
    }
    
    /* Contact */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .contact-form {
        padding: var(--spacing-md);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        gap: var(--spacing-sm);
    }
    
    .info-item {
        padding: var(--spacing-sm);
    }
    
    .info-item i {
        font-size: 1.25rem;
    }
    
    /* Contacts Section */
    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .contact-info-grid .info-item {
        padding: var(--spacing-md);
    }
    
    .info-item-map-only {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
    }
    
    .map-mobile {
        display: block !important;
    }
    
    .map-desktop {
        display: none !important;
    }
    
    .info-item-combined {
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-sm);
        border: none !important;
    }
    
    .combined-info-section {
        padding: var(--spacing-md);
        width: 100%;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    
    .combined-info-section:not(:last-of-type) {
        padding-right: var(--spacing-md);
        padding-bottom: var(--spacing-md);
        border-right: none;
        border-bottom: 2px solid var(--gold-medium);
    }
    
    .combined-info-address {
        border-bottom: none !important;
    }
    
    .combined-info-section i {
        font-size: 2rem !important;
        margin-bottom: 0 !important;
        margin-right: 0 !important;
        flex-shrink: 0;
        width: 2.5rem !important;
        min-width: 2.5rem;
        text-align: center !important;
    }
    
    .combined-info-section > div,
    .combined-info-section > p,
    .combined-info-section > a {
        flex: 1;
    }
    
    .combined-info-section h4 {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .combined-info-section p,
    .combined-info-section a {
        font-size: 0.95rem;
    }
    
    .combined-info-address {
        align-items: flex-start !important;
    }
    
    .combined-info-address .btn-navigate {
        margin-top: var(--spacing-sm);
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .map-container {
        width: 100%;
        margin-top: var(--spacing-md);
        border-radius: 12px;
        overflow: hidden;
        border: none !important;
    }
    
    .map-container iframe {
        height: 250px;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .footer-links-bottom {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    /* Chatbot */
    .chatbot-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    .chatbot-toggle {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    .chatbot-window {
        width: calc(100vw - 2rem);
        height: 500px;
        max-width: 380px;
        bottom: 72px;
    }
    
    .chatbot-messages {
        padding: var(--spacing-sm);
    }
    
    .quick-question {
        padding: 0.625rem var(--spacing-sm);
        font-size: 0.875rem;
    }
    
    /* Modal */
    .modal-content {
        margin: 0 var(--spacing-md);
        padding: var(--spacing-lg);
    }
    
    .modal-icon {
        font-size: 3rem;
    }
    
    /* Testimonials - Carousel on mobile */
    .testimonials-slider {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--spacing-md);
        padding-bottom: var(--spacing-sm);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .testimonials-slider::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .testimonial-card {
        min-width: 85%;
        max-width: 85%;
        height: 450px;
        flex-shrink: 0;
        scroll-snap-align: center;
        padding: var(--spacing-md);
        display: flex;
        flex-direction: column;
    }
    
    .testimonial-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .testimonial-text {
        flex: 1;
        overflow-y: auto;
    }
    
    .quote-icon {
        font-size: 1.5rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
    }
    
    .testimonials-dots {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: var(--spacing-md);
    }
    
    .testimonials-dots .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: var(--gold-medium);
        cursor: pointer;
        transition: var(--transition-fast);
        opacity: 0.5;
    }
    
    .testimonials-dots .dot.active {
        background-color: var(--primary-navy);
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ========================================
   Small Mobile (320px - 479px)
   ======================================== */
@media (max-width: 479px) {
    :root {
        --spacing-xxl: 2.5rem;
        --spacing-xl: 2rem;
        --spacing-lg: 1.5rem;
        --spacing-md: 1rem;
    }
    
    html {
        font-size: 15px;
    }
    
    /* Hero */
    .hero {
        min-height: 100vh;
        padding: 100px 0 30px;
        display: flex;
        align-items: flex-start;
    }
    
    .hero-title {
        font-size: 2.25rem;
        margin-top: 40px;
        margin-bottom: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2.5rem;
    }
    
    .btn-hero {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
        margin-bottom: 2.5rem;
    }
    
    .hero-stats {
        flex-direction: row;
        align-items: flex-start;
        text-align: center;
        gap: 1rem;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .stat-item {
        flex: 1;
        min-width: auto;
        flex-shrink: 0;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    /* Cards */
    .pain-card,
    .advantage-card,
    .service-card {
        padding: var(--spacing-sm);
    }
    
    .pain-icon {
        width: 55px;
        height: 55px;
        min-width: 55px;
        font-size: 1.25rem;
    }
    
    .advantage-icon {
        width: 50px;
        height: 50px;
        font-size: 1.125rem;
    }
    
    .service-icon {
        width: 55px;
        height: 55px;
        min-width: 55px;
        font-size: 1.25rem;
    }
    
    .pain-cta {
        padding: var(--spacing-md);
    }
    
    .pain-cta-text {
        font-size: 1rem;
    }
    
    .pain-cta .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Process */
    .process-step {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .process-step:not(:last-child)::after {
        display: none;
    }
    
    .step-number {
        margin: 0 auto var(--spacing-sm);
    }
    
    .step-content {
        grid-column: 1;
    }
    
    .step-icon {
        grid-column: 1;
        margin: var(--spacing-sm) auto 0;
        max-width: 200px;
    }
    
    /* Contact Form */
    .form-group input,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .btn-submit {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Chatbot */
    .chatbot-window {
        width: calc(100vw - 1rem);
        height: calc(100vh - 100px);
        bottom: 68px;
        right: 0.5rem;
    }
    
    .chatbot-container {
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    .chatbot-toggle {
        width: 52px;
        height: 52px;
        font-size: 1.125rem;
    }
}

/* ========================================
   Landscape Mobile Optimization
   ======================================== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .hero-stats {
        flex-direction: row;
        justify-content: center;
    }
    
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .chatbot-window {
        height: calc(100vh - 80px);
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .header,
    .chatbot-container,
    .btn,
    .hero-wave {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    section {
        padding: 1.5rem 0;
        page-break-inside: avoid;
    }
    
    .footer {
        page-break-before: always;
    }
    
    * {
        box-shadow: none !important;
    }
}

/* ========================================
   Accessibility Improvements
   ======================================== */

/* Focus Styles */
*:focus-visible {
    outline: 3px solid var(--gold-dark);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-navy: #0F1A2A;
        --gray-medium: #5A5A5A;
    }
    
    .btn-primary,
    .chatbot-toggle {
        border: 2px solid var(--white);
    }
    
    .advantage-card,
    .service-card {
        border: 2px solid var(--gold-dark);
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment if you want to support dark mode */
    /*
    :root {
        --white: #1A1A1A;
        --primary-navy: #0F1A2A;
        --gold-light: #2A2A2A;
        --gold-medium: #D4B978;
        --gray-light: #404040;
    }
    
    .header {
        background-color: #1A1A1A;
    }
    
    .advantage-card,
    .service-card,
    .process-step,
    .why-item {
        background-color: #2A2A2A;
    }
    */
}
/* ========================================
   Team Section - Responsive
   ======================================== */

@media (max-width: 1023px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--spacing-md);
    }
    
    .team-photo {
        height: 300px;
    }
}

@media (max-width: 767px) {
    /* Partners Section */
    .partners-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .partner-image {
        height: 300px;
    }
    
    .partner-name {
        font-size: 1.5rem;
    }
    
    .partner-title {
        font-size: 1rem;
    }
    
    .partner-description {
        font-size: 0.95rem;
    }
    
    /* Advantages 3D Carousel */
    .carousel-3d-container {
        height: 400px;
    }
    
    .advantage-card-3d {
        width: 280px;
        padding: var(--spacing-md);
    }
    
    .advantage-card-3d.left {
        transform: translateX(-150px) translateZ(-150px) rotateY(25deg) scale(0.7);
        opacity: 0.4;
    }
    
    .advantage-card-3d.right {
        transform: translateX(150px) translateZ(-150px) rotateY(-25deg) scale(0.7);
        opacity: 0.4;
    }
    
    .advantage-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .advantage-title {
        font-size: 1.25rem;
    }
    
    .advantage-text {
        font-size: 0.9rem;
    }
    
    /* Awards Section */
    .award-image {
        max-width: 100%;
    }
    
    .award-title {
        font-size: 1.4rem;
    }
    
    .award-description {
        font-size: 1rem;
    }
    
    /* Cases Section */
    .cases-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .case-card {
        padding: var(--spacing-md);
    }
    
    .case-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .case-metrics {
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
    
    .metric-label {
        font-size: 0.75rem;
    }
    
    .case-link {
        width: 100%;
        max-width: 300px;
    }
    
    /* Team Section */
    .team-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .team-photo {
        height: 350px;
    }
    
    .team-info {
        padding: var(--spacing-md);
    }
    
    .team-name {
        font-size: 1.3rem;
    }
}
