/* Responsive Design - Tecnologia Style */

/* Large Desktop (1200px and above) */
@media (min-width: 1200px) {
    .hero-container {
        gap: 5rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-content {
        padding-right: 3rem;
    }
}

/* Desktop (992px to 1199px) */
@media (max-width: 1199px) {
    .hero-container {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

/* Tablet Landscape (900px to 991px) */
@media (max-width: 991px) {
    :root {
        --container-max-width: 960px;
    }
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .hero-container {
        gap: 2.5rem;
    }
    
    .hero-title {
        font-size: 3.25rem;
    }
    
    .stats-container {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* Tablet Portrait (768px to 899px) */
@media (max-width: 899px) {
    /* Mobile Navigation */
    .nav-container {
        padding: 0.85rem 1.2rem;
        gap: 0.75rem;
        align-items: center;
    }

    .nav-brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .logo-icon img {
        max-width: 170px;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2.5rem 1.75rem 3rem;
        box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        gap: 1.25rem;
        z-index: 1000;
        align-items: flex-start;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu > li {
        width: 100%;
    }

    .nav-link {
        font-size: 1.15rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        color: var(--navy-text);
    }

    .dropdown-toggle {
        justify-content: space-between;
        width: 100%;
    }
    
    /* Mobile dropdown styles */
    .dropdown-menu {
        position: static;
        background: #f8fafc;
        border: none;
        border-radius: 12px;
        box-shadow: none;
        margin-top: 0.75rem;
        margin-left: 0;
        min-width: auto;
        width: 100%;
        padding: 0.75rem 0;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .dropdown:hover .dropdown-menu,
    .dropdown-toggle[aria-expanded="true"] + .dropdown-menu,
    .dropdown-active .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .dropdown-item {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        font-weight: 500;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        border: none;
        justify-content: center;
        align-items: center;
        background: transparent;
        box-shadow: none;
        margin-left: auto;
        flex-shrink: 0;
        padding: 0;
    }
    
    .nav-toggle.active .hamburger:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active .hamburger:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .hamburger:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hamburger {
        width: 24px;
        height: 2.5px;
        background: var(--navy-text);
    }
    
    /* Hero Section Adjustments */
    .hero {
        padding: 2rem 1.5rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
        order: 2;
    }
    
    .hero-visual {
        order: 1;
    }
    
    .hero-title {
        font-size: 3rem;
        text-align: center;
    }
    
    .hero-subtitle {
        text-align: center;
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Statistics - 3 columns on tablet */
    .stats-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .stat-item:nth-child(4) {
        grid-column: 1 / 3;
    }
    
    .stat-item:nth-child(5) {
        grid-column: 3;
    }
    
    /* Contact section in header - stack vertically */
    .nav-contact {
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
        width: auto;
        border-top: none;
        padding-top: 0;
        flex-shrink: 0;
    }

    .nav-contact .client-support {
        display: none;
    }

    .nav-contact .btn {
        width: auto;
        justify-content: center;
        padding: 0.65rem 1.1rem;
        font-size: 0.95rem;
        border-radius: 12px;
        box-shadow: 0 6px 16px rgba(74, 124, 89, 0.25);
    }
}

/* Mobile Large (576px to 767px) */
@media (max-width: 767px) {
    :root {
        --container-max-width: 640px;
    }
    :root {
        --hero-padding: 2rem 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 2rem 1rem;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .office-photo {
        height: 360px;
    }
    
    /* Statistics - 2 columns on mobile */
    .stats-section {
        padding: 2rem 0;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
        padding: 0 1.5rem;
    }
    
    /* First item (Reviews) spans full width */
    .stats-container .stat-item:first-child {
        grid-column: 1 / -1;
        text-align: center;
        border-right: none;
        padding-right: 0;
        padding-bottom: 1.5rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    /* Center the review lines on mobile */
    .review-line-1,
    .review-line-2 {
        justify-content: center;
    }
    
    /* Remove borders from all other items on mobile */
    .stats-container .stat-item:not(:first-child) {
        border-right: none;
        padding-right: 0;
        text-align: center;
    }
    
    .stat-number {
        font-size: 28px;
        justify-content: center;
    }
    
    .stat-unit {
        font-size: 16px;
    }
    
    .stat-description {
        font-size: 13px;
        line-height: 1.4;
    }
    
    /* Hide contact info on smaller screens, show only button */
    .client-support {
        display: none;
    }
    
    .nav-contact {
        flex-direction: row;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.625rem 1.25rem;
    }
}

/* Mobile Medium (480px to 575px) */
@media (max-width: 575px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle br {
        display: none;
    }
    
    .brand-text {
        font-size: 1.25rem;
    }
    
    .office-photo {
        height: 250px;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Mobile Small (320px to 479px) */
@media (max-width: 479px) {
    :root {
        --container-max-width: 420px;
    }
    :root {
        --hero-padding: 1.5rem 0.75rem;
    }
    
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-title br {
        display: none;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .stats-container {
        padding: 0 0.75rem;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-item:first-child {
        margin-bottom: 0;
    }
    
    .stat-item {
        padding: 0.5rem 0;
    }
    
    .office-photo {
        height: 200px;
    }
    
    .clutch-logo {
        font-size: 1.25rem;
    }
    
    .brand-text {
        display: none;
    }

    /* What We Do responsive */
    .wwd-card {
        grid-template-columns: 1fr;
        text-align: left;
        padding: 1.5rem;
    }

    .wwd-title {
        font-size: 2rem;
    }

    .wwd-diamond {
        width: 140px;
        height: 140px;
        margin-top: 0.5rem;
    }

    .features {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
    
    .feature-link {
        font-size: 0.85rem;
        margin-top: 0.75rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        padding: 2rem 1rem;
        min-height: auto;
    }
    
    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .hero-content {
        order: 1;
        text-align: left;
    }
    
    .hero-visual {
        order: 2;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .btn-large {
        width: auto;
    }
    
    .office-photo {
        height: 300px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon svg {
        width: 36px;
        height: 36px;
    }
}

/* 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-green: #4A7C59;
        --navy-text: #2C3E35;
        --gray-text: #4a5568;
        --dark-text: #000000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .stats-section {
        background: #000000;
    }
}

/* DISABLED: Dark Mode Support - Force Light Theme to Match Tecnologia Design */
/* 
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1f2937;
        --light-gray: #111827;
        --dark-text: #f9fafb;
        --gray-text: #d1d5db;
        --navy-text: #f3f4f6;
        --stats-bg: #000000;
    }
    
    body {
        background-color: var(--white);
        color: var(--dark-text);
    }
    
    .header {
        background: var(--white);
        border-bottom-color: #374151;
    }
    
    .nav-menu {
        background: var(--white);
    }
    
    /* Office photo styling handled in main.css */
}
*/

/* FORCE LIGHT THEME - Override any dark mode preferences */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #ffffff !important;
        --light-gray: #f8fafc !important;
        --dark-text: #374151 !important;
        --gray-text: #6b7280 !important;
        --navy-text: #1e3a8a !important;
        --stats-bg: #374151 !important;
    }
    
    body {
        background-color: #ffffff !important;
        color: #374151 !important;
    }
    
    .header {
        background: #ffffff !important;
        border-bottom-color: #e5e7eb !important;
    }
    
    .nav-menu {
        background: #ffffff !important;
    }
    
    .hero {
        background: #ffffff !important;
    }
    
    .hero-title {
        color: #1e3a8a !important;
    }
    
    .hero-subtitle {
        color: #6b7280 !important;
    }
}

/* Print Styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .header,
    .nav-toggle,
    .stats-section {
        display: none;
    }
    
    .main {
        margin-top: 0;
    }
    
    .hero {
        padding: 1rem 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero-visual {
        display: none;
    }
    
    .hero-buttons {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
        color: black !important;
    }
    
    .hero-subtitle {
        color: #666 !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-link {
        padding: 0.75rem 0.5rem;
    }
    
    .btn {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .nav-toggle {
        padding: 0.75rem;
        touch-action: manipulation;
    }
}

/* Hover Support */
@media (hover: hover) and (pointer: fine) {
    .nav-link:hover {
        color: var(--primary-green);
    }
    
    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(74, 124, 89, 0.4);
    }
    
    .btn-secondary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}

/* ==========================
   FOOTER RESPONSIVE DESIGN
   ========================== */

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 3rem;
    }
    
    .footer-section:last-child {
        grid-column: 1 / -1;
        max-width: 600px;
        margin: 2rem auto 0;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 3rem 0 2.5rem 0;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-description {
        max-width: 100%;
        margin-bottom: 2rem;
    }
    
    .footer-contact {
        align-items: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-cta {
        margin-top: 1.5rem;
    }
    
    .footer-bottom {
        padding: 1.5rem 0;
    }
    
    .regulatory-info {
        font-size: 0.8rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 1rem;
    }
    
    .footer-main {
        gap: 2.5rem;
        padding: 2.5rem 0 2rem 0;
    }
    
    .contact-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .footer-links {
        gap: 1rem;
    }
    
    .footer-links a {
        padding: 0.5rem 0;
        font-size: 1rem;
    }
    
    .footer-logo-img {
        height: 50px;
    }
    
    /* Center social icons on small mobile */
    .footer-social {
        justify-content: center;
    }
}

/* ==========================
   MOBILE BUTTON AND HEADING CENTERING
   ========================== */

@media (max-width: 768px) {
    /* Center all button containers on mobile */
    .form-actions,
    .modal-actions,
    .step-navigation,
    .cta-buttons,
    .faq-cta-buttons,
    .hero-buttons {
        justify-content: center !important;
        text-align: center;
    }
    
    /* Center modal step buttons */
    .modal-body form > div:last-child,
    .modal-footer {
        display: flex;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    /* Specific button centering */
    button[type="submit"],
    button[type="button"],
    .btn-primary,
    .btn-secondary {
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Center section headings on mobile for specific pages */
    /* Credit Resolve Page */
    .credit-resolve-page .section-label,
    .credit-resolve-page .section-title,
    .credit-resolve-page .section-subtitle,
    .credit-resolve-page h2,
    .credit-resolve-page h3:not(.faq-question h3) {
        text-align: center;
    }
    
    /* About Us Page */
    .about-page .section-label,
    .about-page .section-title,
    .about-page h2,
    .about-page h3 {
        text-align: center;
    }
    
    /* Contact Us Page */
    .contact-page .section-label,
    .contact-page .section-title,
    .contact-page h2,
    .contact-page .why-choose-section h3,
    .contact-page .features-grid {
        text-align: center;
    }
    
    .contact-page .features-grid {
        justify-content: center;
    }
    
    /* Form spacing improvements */
    .contact-form {
        padding: 2rem 1.5rem !important;
    }
    
    .contact-form .form-row {
        gap: 1.5rem !important;
    }
    
    .contact-form .form-group {
        margin-bottom: 1.5rem !important;
    }
}