/* ==========================================================================
   MASCULINE FORM - Responsive Styles
   Breakpoints: Mobile (<768px), Tablet (768-1199px), Desktop (≥1200px)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Mobile First / Default Overrides (< 768px)
   Most base styles should be in style.css. This section handles specific
   mobile adaptations if base styles are desktop-first, or specific tweaks.
   -------------------------------------------------------------------------- */

@media screen and (max-width: 767px) {
    /* Typography Scaling */
    h1 { font-size: 2.5rem !important; }
    h2 { font-size: 2rem !important; }
    h3 { font-size: 1.5rem !important; }
    p { font-size: 0.95rem !important; line-height: 1.6; }

    /* Layout & Containers */
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        width: 100%;
    }

    section {
        padding: 3rem 0;
    }

    /* Navigation - Hamburger Menu */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--color-charcoal);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        z-index: 998;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.5rem;
        color: var(--color-white);
    }

    .mobile-menu-btn {
        display: block !important;
        z-index: 999;
    }

    /* Hero Section */
    .hero-title {
        font-size: 2rem;
        padding: 0 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 0.1em;
    }

    /* Grids to Stack */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    /* Component Specifics */
    .timeline-item {
        flex-direction: column;
        padding-left: 2rem;
        border-left: 2px solid var(--color-sand);
        margin-left: 1rem;
    }
    
    .timeline-date {
        position: static;
        margin-bottom: 0.5rem;
    }

    .timeline-content {
        width: 100%;
        padding: 0;
        text-align: left;
    }
    
    .timeline-marker {
        left: -2.6rem;
    }

    .styling-nav ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 1rem;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .styling-nav li {
        flex: 0 0 auto;
        margin-right: 1.5rem;
    }
}

/* --------------------------------------------------------------------------
   Tablet (768px - 1199px)
   -------------------------------------------------------------------------- */

@media screen and (min-width: 768px) and (max-width: 1199px) {
    /* Typography */
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }

    /* Layout */
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
        max-width: 90%;
    }

    /* Grids */
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Navigation */
    .nav-links {
        display: flex;
        position: static;
        height: auto;
        background: transparent;
        flex-direction: row;
        width: auto;
    }

    .nav-links li {
        margin: 0 1rem;
        opacity: 1;
        transform: none;
    }

    .nav-links a {
        font-size: 0.9rem;
        color: inherit;
    }

    .mobile-menu-btn {
        display: none !important;
    }
    
    /* Timeline */
    .timeline::before {
        left: 50%;
    }
    
    .timeline-item:nth-child(odd) .timeline-content {
        text-align: right;
        padding-right: 3rem;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
        padding-left: 3rem;
    }
    
    .timeline-item:nth-child(odd) {
        flex-direction: row;
    }
    
    .timeline-item:nth-child(even) {
        flex-direction: row-reverse;
    }
}

/* --------------------------------------------------------------------------
   Desktop (≥ 1200px)
   -------------------------------------------------------------------------- */

@media screen and (min-width: 1200px) {
    .container {
        max-width: 1280px;
        margin: 0 auto;
    }

    /* Enhanced Hover Effects for Mouse Users */
    .btn-explore:hover {
        background-color: var(--color-white);
        color: var(--color-charcoal);
        transform: translateY(-2px);
    }

    .card-image img {
        transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .card:hover .card-image img {
        transform: scale(1.05);
    }
    
    /* Navigation Hover */
    .nav-links a {
        position: relative;
    }

    .nav-links a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 1px;
        bottom: -4px;
        left: 0;
        background-color: var(--color-gold);
        transition: width 0.3s ease;
    }

    .nav-links a:hover::after {
        width: 100%;
    }

    /* Full Grids */
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --------------------------------------------------------------------------
   Utility: Orientation Changes & Specific Fixes
   -------------------------------------------------------------------------- */

@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 120vh; /* Allow scrolling on short landscape screens */
    }
    
    .nav-links {
        overflow-y: auto;
        justify-content: flex-start;
        padding-top: 4rem;
    }
}