/* Responsive Styles for Adverta Limited */

/* Large Desktop (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
}

/* Desktop (1200px and up) */
@media (min-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .service-card.featured {
        grid-column: span 3;
        grid-template-columns: 1fr 2fr;
    }
}

/* Tablet Landscape (992px to 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-card.featured {
        grid-column: span 2;
        grid-template-columns: 1fr;
    }
    
    .service-card.featured .service-image {
        height: 200px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-info-container {
        position: static;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .content-image {
        order: -1;
    }
}

/* Tablet Portrait (768px to 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 2rem;
        gap: 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #e9ecef;
        border-radius: 0;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Sections */
    section {
        padding: 60px 0;
    }
    
    .page-header {
        padding: 120px 0 60px;
    }
    
    /* Grids */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
    
    .services-list {
        grid-template-columns: 1fr;
    }
    
    .service-item {
        flex-direction: column;
        text-align: center;
    }
    
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .contact-info p {
        justify-content: center;
    }
}

/* Mobile Landscape (576px to 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Page Header */
    .page-header {
        padding: 100px 0 50px;
    }
    
    .contact-header {
        padding: 100px 0 40px;
    }
    
    /* Sections */
    section {
        padding: 50px 0;
    }
    
    /* Cards */
    .feature-card,
    .service-card .service-content,
    .value-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-form-container,
    .contact-info-card {
        padding: 2rem;
    }
    
    .legal-document {
        padding: 2rem;
    }
    
    /* Form */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .services-list {
        gap: 1.5rem;
    }
    
    .service-item {
        padding: 1.5rem;
    }
    
    /* Process Steps */
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    /* Cookie Consent */
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    /* Tables */
    .cookie-table {
        font-size: 14px;
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 8px 12px;
    }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 15px;
    }
    
    /* Header */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .logo {
        height: 35px;
    }
    
    .brand-text {
        font-size: 1.25rem;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn-lg {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* Page Header */
    .page-header {
        padding: 90px 0 40px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    /* Sections */
    section {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    /* Cards */
    .feature-card,
    .service-card .service-content,
    .value-card,
    .contact-form-container,
    .contact-info-card {
        padding: 1.5rem;
    }
    
    .info-card {
        padding: 2rem;
    }
    
    .legal-document {
        padding: 1.5rem;
    }
    
    /* Icons */
    .feature-icon,
    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .service-icon,
    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Service Images */
    .service-image {
        height: 200px;
    }
    
    /* Contact Items */
    .contact-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .info-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    /* Cookie Consent */
    .cookie-consent {
        padding: 1rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
    
    /* Tables - Stack on mobile */
    .cookie-table table,
    .cookie-table thead,
    .cookie-table tbody,
    .cookie-table th,
    .cookie-table td,
    .cookie-table tr {
        display: block;
    }
    
    .cookie-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .cookie-table tr {
        border: 1px solid #ccc;
        margin-bottom: 0.5rem;
        border-radius: 8px;
        padding: 1rem;
        background: white;
    }
    
    .cookie-table td {
        border: none;
        position: relative;
        padding: 0.5rem 0;
        padding-left: 50%;
        text-align: left;
    }
    
    .cookie-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        text-align: left;
        font-weight: bold;
        color: #333;
    }
    
    /* Form adjustments */
    .checkbox-label {
        font-size: 13px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Extra Small Devices (up to 400px) */
@media (max-width: 400px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .feature-card,
    .service-card .service-content,
    .value-card,
    .contact-form-container,
    .contact-info-card,
    .legal-document {
        padding: 1rem;
    }
    
    .cookie-consent {
        padding: 0.75rem;
    }
    
    .feature-icon,
    .value-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo,
    .hero-img,
    .service-image img,
    .content-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* This is optional - could implement dark mode styles here */
    /* For now, keeping the light theme as default */
}

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

/* Print Styles */
@media print {
    .nav-toggle,
    .cookie-consent,
    .btn,
    .hero-buttons {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-background,
    .hero-overlay,
    .contact-bg,
    .contact-overlay {
        display: none !important;
    }
    
    .hero-content,
    .page-header {
        color: #333 !important;
    }
    
    section {
        padding: 1rem 0;
        break-inside: avoid;
    }
    
    .feature-card,
    .service-card,
    .value-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .contact-form-container {
        display: none;
    }
    
    .footer {
        background: white !important;
        color: #333 !important;
    }
    
    .footer-section h3,
    .footer-section h4 {
        color: #333 !important;
    }
    
    .contact-info p {
        color: #666 !important;
    }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #000;
    }
    
    .btn-outline {
        border: 3px solid #000;
        color: #000;
    }
    
    .feature-icon,
    .service-icon,
    .value-icon,
    .contact-icon,
    .step-number {
        background: #000 !important;
        color: #fff !important;
    }
}

/* Focus Management for Mobile */
@media (max-width: 767px) {
    button:focus,
    input:focus,
    select:focus,
    textarea:focus,
    a:focus {
        outline: 3px solid #007bff;
        outline-offset: 3px;
    }
}

/* Landscape Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .page-header {
        padding: 80px 0 40px;
    }
}

/* Safari iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        border-radius: 0;
        -webkit-appearance: none;
    }
}
