/* Responsive Design - Mobile First Approach */

/* Large screens (desktops) */
@media (max-width: 1200px) {
    .container {
        max-width: 1000px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2.25rem;
    }
}

/* Medium screens (tablets) */
@media (max-width: 992px) {
    .container {
        max-width: 750px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Small screens (mobile landscape) */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--background-white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--box-shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-menu a::after {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero {
        padding: 3rem 0;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-bg {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Section spacing */
    .services,
    .portfolio,
    .about,
    .testimonials {
        padding: 3rem 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Service Cards */
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* About Section */
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Newsletter */
    .newsletter {
        padding: 3rem 0;
    }
    
    .newsletter-form {
        max-width: 100%;
    }
    
    /* Contact */
    .contact {
        padding: 3rem 0;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-posts {
        padding: 3rem 0;
    }
    
    /* Cookie Banner */
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Thank you page */
    .thank-you-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .thank-you-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Extra small screens (mobile portrait) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Typography */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* Cards and components */
    .service-card,
    .portfolio-item,
    .testimonial-card {
        margin: 0 0.5rem;
    }
    
    .testimonial-header {
        flex-direction: column;
        text-align: center;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Cookie modal */
    .cookie-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .cookie-modal-buttons {
        flex-direction: column;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Portfolio and Blog grids */
    .portfolio-grid,
    .services-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Spacing adjustments */
    .hero,
    .services,
    .portfolio,
    .about,
    .testimonials,
    .contact,
    .blog-posts {
        padding: 2rem 0;
    }
    
    .newsletter {
        padding: 2.5rem 0;
    }
    
    /* Article content */
    .article-main {
        padding: 1rem 0;
    }
    
    .article-content {
        padding: 0 1rem;
    }
    
    .share-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .legal-main {
        padding: 2rem 0;
    }
    
    .legal-content {
        padding: 0 1rem;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .cookie-modal,
    .hero-buttons,
    .social-links,
    .share-buttons {
        display: none !important;
    }
    
    .hero {
        background: none !important;
        color: black !important;
    }
    
    .newsletter {
        background: none !important;
        color: black !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
        background: white;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .article-content,
    .legal-content {
        max-width: none;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .section-header {
        margin-bottom: 1rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #000080;
        --text-dark: #000000;
        --text-light: #000000;
        --background-light: #ffffff;
        --border-light: #000000;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid #000000;
    }
    
    .service-card,
    .portfolio-item,
    .testimonial-card,
    .blog-card {
        border: 2px solid #000000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-title {
        background: none;
        -webkit-text-fill-color: var(--text-dark);
        color: var(--text-dark);
    }
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10001;
}

.skip-to-content:focus {
    top: 6px;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error states */
.error {
    color: var(--error-color);
    border-color: var(--error-color);
}

.success {
    color: var(--success-color);
    border-color: var(--success-color);
}

/* Table responsiveness */
.table-responsive {
    overflow-x: auto;
}

.table-responsive table {
    min-width: 600px;
}

@media (max-width: 768px) {
    .table-responsive table {
        font-size: 0.875rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem;
    }
}
