/**
 * CVPhotoVault - Responsive Styles
 * Mobile, tablet, and desktop breakpoints
 */

/* Tablet Devices (768px and below) */
@media (max-width: 768px) {
    .site-header-inner {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .main-navigation {
        width: 100%;
        display: none;
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .main-navigation.active {
        display: flex;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: var(--spacing-md);
        width: 100%;
    }

    .menu-toggle {
        display: flex;
    }

    h1 {
        font-size: 42px;
    }

    h2 {
        font-size: 32px;
    }

    h3 {
        font-size: 24px;
    }

    .cvphotovault-container {
        padding: 0 var(--spacing-md);
    }

    .cvphotovault-content-wrapper {
        margin: var(--spacing-xl) 0;
    }

    /* Footer */
    .site-footer-inner {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-navigation ul {
        justify-content: flex-start;
    }
}

/* Mobile Devices (480px and below) */
@media (max-width: 480px) {
    :root {
        --spacing-lg: 24px;
        --spacing-xl: 32px;
        --spacing-xxl: 40px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 18px;
    }

    h4 {
        font-size: 16px;
    }

    .cvphotovault-container {
        padding: 0 var(--spacing-sm);
    }

    .button,
    button,
    input[type="submit"],
    input[type="button"],
    a.button {
        width: 100%;
        text-align: center;
        padding: var(--spacing-md) var(--spacing-sm);
    }

    /* Navigation */
    .site-branding {
        width: 100%;
        justify-content: center;
    }

    /* Content */
    .entry-content {
        font-size: 14px;
    }

    /* Grid Columns - 1 Column on Mobile */
    .elementor-row,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
    }

    /* Tables */
    table {
        width: 100%;
        overflow-x: auto;
        display: block;
    }

    td, th {
        padding: 8px;
        font-size: 12px;
    }
}

/* Large Screens (1024px and above) */
@media (min-width: 1024px) {
    .cvphotovault-container {
        max-width: 1200px;
    }

    .site-header-inner {
        flex-direction: row;
    }

    .main-navigation {
        display: flex !important;
    }
}

/* Extra Large Screens (1440px and above) */
@media (min-width: 1440px) {
    .cvphotovault-container {
        max-width: 1320px;
        margin: 0 auto;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .menu-toggle,
    .search-form {
        display: none;
    }

    body {
        background: #ffffff;
    }

    .entry-content {
        max-width: 100%;
    }
}

/* High DPI / Retina Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Landscape Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .site-header {
        padding: 8px 0;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }
}

/*
 * Auto OS-preference dark mode intentionally removed. This theme's pages are
 * built with Elementor, where every section already sets its own explicit
 * background/text colors as part of the page design. A blanket
 * prefers-color-scheme override forced the <body> and header to near-black
 * regardless of what each Elementor section intended, which is what made
 * pages look broken (solid black backgrounds, wrong-looking text colors) for
 * any visitor whose OS/browser was set to dark mode.
 */

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