/* ===================================
   Responsive CSS
   Mobile-first responsive design
   =================================== */

/* ===================================
   Large Tablets & Small Desktops (max-width: 1024px)
   =================================== */
@media (max-width: 1024px) {
    :root {
        --spacing-3xl: 4rem;
        --spacing-2xl: 3rem;
    }
    
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-wrapper {
        grid-template-columns: 1fr 350px;
        gap: var(--spacing-xl);
    }
}

/* ===================================
   Tablets (max-width: 768px)
   =================================== */
@media (max-width: 768px) {
    :root {
        --spacing-3xl: 3rem;
        --spacing-2xl: 2rem;
    }
    
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    /* Top Bar */
    .top-bar {
        font-size: 0.8125rem;
    }
    
    .top-bar-content {
        justify-content: center;
    }
    
    .top-bar-left,
    .top-bar-right {
        justify-content: center;
    }
    
    /* Header & Navigation */
    .navbar {
        flex-wrap: wrap;
    }
    
    .logo h2 {
        font-size: 1.25rem;
    }
    
    .logo-subtitle {
        font-size: 0.8125rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 3;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        align-items: start;
        padding: var(--spacing-2xl) var(--spacing-lg);
        box-shadow: var(--shadow-2xl);
        transition: right var(--transition-base);
        z-index: 1001;
        overflow-y: auto;
        gap: var(--spacing-sm);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu li a {
        display: block;
        padding: var(--spacing-sm);
        width: 100%;
    }
    
    .header-actions {
        order: 2;
    }
    
    /* Overlay for mobile menu */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }
    
    /* Hero Section */
    .hero {
        min-height: auto;
        padding: var(--spacing-2xl) 0;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        min-height: auto;
    }
    
    .hero-content {
        text-align: center;
        order: 1;
    }
    
    .hero-badge {
        display: inline-flex;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.25;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1.0625rem;
    }
    
    .hero-buttons {
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-visual {
        order: 2;
    }
    
    .hero-card {
        padding: var(--spacing-lg);
    }
    
    .hero-card-icon {
        width: 70px;
        height: 70px;
    }
    
    .hero-card h3 {
        font-size: 1.25rem;
    }
    
    .info-item {
        font-size: 0.9375rem;
    }
    
    /* Trust Badges */
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .badge-icon {
        width: 50px;
        height: 50px;
    }
    
    .badge h3 {
        font-size: 1rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .service-card {
        padding: var(--spacing-lg);
    }
    
    /* How It Works */
    .steps-container {
        flex-direction: column;
    }
    
    .step {
        max-width: 100%;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .testimonial-card {
        padding: var(--spacing-lg);
    }
    
    /* Consultation Form */
    .form-wrapper {
        grid-template-columns: 1fr;
    }
    
    .form-content {
        padding: var(--spacing-lg);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-sidebar {
        position: static;
    }
    
    /* CTA Section */
    .cta-content h2 {
        font-size: 1.75rem;
    }
    
    .cta-content p {
        font-size: 1.0625rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Page Hero */
    .page-hero-content h1 {
        font-size: 2rem;
    }
    
    .page-hero-content p {
        font-size: 1.0625rem;
    }
    
    /* Service Detail */
    .service-detail-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .service-detail-wrapper.reverse {
        grid-template-columns: 1fr;
    }
    
    .service-detail-wrapper.reverse .service-detail-icon {
        order: 1;
    }
    
    .service-detail-wrapper.reverse .service-detail-content {
        order: 2;
    }
    
    .service-detail-icon {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }
    
    .service-detail-content h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .service-detail-intro {
        text-align: center;
    }
    
    .service-cta {
        flex-direction: column;
    }
    
    .service-cta .btn {
        width: 100%;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* Floating Buttons */
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 55px;
        height: 55px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ===================================
   Mobile (max-width: 480px)
   =================================== */
@media (max-width: 480px) {
    :root {
        --spacing-3xl: 2rem;
        --spacing-2xl: 1.5rem;
        --spacing-xl: 1.25rem;
    }
    
    html {
        font-size: 14px;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Top Bar */
    .top-bar-item {
        font-size: 0.75rem;
        gap: 0.25rem;
    }
    
    .top-bar-item svg {
        width: 14px;
        height: 14px;
    }
    
    .top-bar-item.highlight {
        padding: 0.25rem 0.5rem;
    }
    
    /* Header */
    .logo h2 {
        font-size: 1.125rem;
    }
    
    .logo-subtitle {
        font-size: 0.75rem;
    }
    
    .header-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
    }
    
    /* Hero */
    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-title {
        font-size: 1.625rem;
        margin-bottom: var(--spacing-sm);
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1.0625rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-description {
        font-size: 0.9375rem;
        margin-bottom: var(--spacing-md);
        line-height: 1.7;
    }
    
    .hero-buttons .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero-card {
        padding: var(--spacing-md);
    }
    
    .hero-card-icon {
        width: 60px;
        height: 60px;
    }
    
    .hero-card-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .hero-card h3 {
        font-size: 1.125rem;
    }
    
    .hero-card p {
        font-size: 0.9375rem;
    }
    
    .info-item {
        font-size: 0.875rem;
    }
    
    .info-item svg {
        width: 18px;
        height: 18px;
    }
    
    .hero-scroll-indicator {
        bottom: var(--spacing-md);
    }
    
    .hero-scroll-indicator span {
        font-size: 0.8125rem;
    }
    
    /* Trust Badges */
    .trust-badges {
        padding: var(--spacing-lg) 0;
        margin-top: -2rem;
    }
    
    .badges-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .badge {
        padding: var(--spacing-sm);
    }
    
    .badge-icon {
        width: 45px;
        height: 45px;
    }
    
    .badge-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .badge h3 {
        font-size: 0.9375rem;
    }
    
    .badge p {
        font-size: 0.8125rem;
    }
    
    /* Section Padding */
    .section-padding {
        padding: var(--spacing-2xl) 0;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: var(--spacing-md);
    }
    
    .feature-icon {
        width: 55px;
        height: 55px;
    }
    
    .feature-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .feature-card h3 {
        font-size: 1.0625rem;
    }
    
    .feature-card p {
        font-size: 0.9375rem;
    }
    
    /* Service Cards */
    .service-card {
        padding: var(--spacing-md);
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    .service-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .service-card h3 {
        font-size: 1.0625rem;
    }
    
    .service-card p {
        font-size: 0.875rem;
    }
    
    /* Steps */
    .step {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
        top: -22px;
    }
    
    .step-icon {
        width: 65px;
        height: 65px;
    }
    
    .step-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .step h3 {
        font-size: 1.0625rem;
    }
    
    .step p {
        font-size: 0.9375rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: var(--spacing-md);
    }
    
    .quote-icon {
        width: 40px;
        height: 40px;
    }
    
    .testimonial-text {
        font-size: 0.9375rem;
    }
    
    .author-name {
        font-size: 0.9375rem;
    }
    
    /* Form */
    .form-content {
        padding: var(--spacing-md);
        border-radius: var(--radius-xl);
    }
    
    .form-group label {
        font-size: 0.9375rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.75rem;
        font-size: 0.9375rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .contact-info-card {
        padding: var(--spacing-md);
    }
    
    .contact-info-card h3 {
        font-size: 1.125rem;
    }
    
    .contact-item {
        padding: var(--spacing-sm) 0;
    }
    
    .contact-label {
        font-size: 0.8125rem;
    }
    
    .contact-value {
        font-size: 0.9375rem;
    }
    
    .reassurance-card {
        padding: var(--spacing-md);
    }
    
    .reassurance-card svg {
        width: 40px;
        height: 40px;
    }
    
    .reassurance-card p {
        font-size: 0.9375rem;
    }
    
    /* CTA */
    .cta-content h2 {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .cta-content p {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    /* Page Hero */
    .page-hero {
        padding: var(--spacing-2xl) 0 var(--spacing-lg);
    }
    
    .page-hero-content h1 {
        font-size: 1.5rem;
    }
    
    .page-hero-content p {
        font-size: 1rem;
    }
    
    .breadcrumb {
        font-size: 0.8125rem;
    }
    
    /* Service Detail */
    .service-detail-icon {
        width: 100px;
        height: 100px;
    }
    
    .service-detail-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .service-detail-content h2 {
        font-size: 1.375rem;
    }
    
    .service-detail-intro {
        font-size: 1rem;
    }
    
    .service-feature {
        padding: var(--spacing-sm);
    }
    
    .service-feature h4 {
        font-size: 1rem;
    }
    
    .service-feature p {
        font-size: 0.9375rem;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-2xl) 0 var(--spacing-sm);
    }
    
    .footer-col h3,
    .footer-col h4 {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .footer-col p,
    .footer-col ul li a {
        font-size: 0.9375rem;
    }
    
    .social-links a {
        width: 36px;
        height: 36px;
    }
    
    .footer-bottom {
        padding-top: var(--spacing-md);
    }
    
    .footer-bottom p {
        font-size: 0.8125rem;
    }
    
    .footer-links {
        font-size: 0.8125rem;
    }
    
    .footer-disclaimer p {
        font-size: 0.75rem;
    }
    
    /* Floating Buttons */
    .whatsapp-float {
        bottom: 15px;
        left: 15px;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .btn svg {
        width: 18px;
        height: 18px;
    }
}

/* ===================================
   Extra Small Devices (max-width: 360px)
   =================================== */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }
    
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .hero-title {
        font-size: 1.375rem;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
    }
    
    .hero-description {
        font-size: 0.875rem;
    }
    
    .hero-buttons .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .section-title {
        font-size: 1.375rem;
    }
    
    .section-description {
        font-size: 0.9375rem;
    }
    
    .feature-card,
    .service-card,
    .testimonial-card {
        padding: var(--spacing-sm);
    }
    
    .whatsapp-float,
    .back-to-top {
        bottom: 10px;
    }
    
    .whatsapp-float {
        left: 10px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top {
        right: 10px;
        width: 38px;
        height: 38px;
    }
}

/* ===================================
   Large Screens (min-width: 1200px)
   =================================== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.875rem;
    }
    
    .hero-description {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* ===================================
   Extra Large Screens (min-width: 1400px)
   =================================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-grid {
        gap: var(--spacing-3xl);
    }
    
    .hero-title {
        font-size: 3.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1.25rem;
    }
    
    .hero-card {
        padding: var(--spacing-2xl);
    }
    
    .hero-card-icon {
        width: 90px;
        height: 90px;
    }
    
    .hero-card h3 {
        font-size: 1.75rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .top-bar,
    .header,
    .whatsapp-float,
    .back-to-top,
    .hero-buttons,
    .cta-section {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .section-padding {
        padding: 20pt 0;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
}

/* ===================================
   Landscape Orientation (Mobile)
   =================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .hero-content {
        padding: var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .hero-scroll-indicator {
        display: none;
    }
}

/* ===================================
   Touch Device Optimizations
   =================================== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .nav-menu li a {
        padding: var(--spacing-md);
    }
    
    .social-icon,
    .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .feature-card:hover,
    .service-card:hover {
        transform: none;
    }
    
    /* Better tap feedback */
    .btn:active {
        transform: scale(0.95);
    }
}

/* ===================================
   Accessibility - High Contrast Mode
   =================================== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #003d7a;
        --text-primary: #000000;
        --bg-white: #ffffff;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
    
    .feature-card,
    .service-card {
        border: 2px solid #000;
    }
}

/* ===================================
   Dark Mode Support (Optional)
   =================================== */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode support
    :root {
        --bg-white: #1a1a1a;
        --bg-light: #2a2a2a;
        --text-primary: #ffffff;
        --text-secondary: #b0b0b0;
        --gray-900: #f9fafb;
    }
    
    .header {
        background-color: #2a2a2a;
        box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
    }
    
    .feature-card,
    .service-card,
    .testimonial-card {
        background-color: #2a2a2a;
    }
    */
}

/* ===================================
   RTL Support Enhancement
   =================================== */
[dir="rtl"] {
    .hero-scroll-indicator,
    .step-arrow {
        transform: scaleX(-1);
    }
    
    .service-link::after {
        content: '→';
    }
    
    .nav-menu {
        right: auto;
        left: -100%;
    }
    
    .nav-menu.active {
        right: auto;
        left: 0;
    }
}

/* ===================================
   Tablet Landscape Specific
   =================================== */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero {
        min-height: 85vh;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
