/* =====================================================
   ULTIMATE GOLF - Modern Responsive Breakpoints
   ===================================================== */

/* =====================================================
   TABLET (1024px and below)
   ===================================================== */

@media (max-width: 1024px) {
    .navbar__menu {
        gap: 0;
    }

    .navbar__link {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
    }

    .programs__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .involved__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story__grid {
        gap: var(--space-10);
    }

    .story__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .mission__grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }
}

/* =====================================================
   TABLET PORTRAIT (768px and below)
   ===================================================== */

@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
    }

    .container {
        padding: 0 var(--space-4);
    }

    .section {
        padding: var(--space-14) 0;
    }

    /* Navigation - Mobile */
    .navbar__toggle {
        display: flex;
    }

    .navbar__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 90px var(--space-6) var(--space-6);
        background: rgba(24, 24, 27, 0.98);
        backdrop-filter: var(--glass-blur);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: var(--shadow-2xl);
        overflow-y: auto;
        transition: right var(--transition-slow);
        z-index: var(--z-modal);
        gap: var(--space-1);
    }

    .navbar__menu.active {
        right: 0;
    }

    .navbar__item {
        width: 100%;
    }

    .navbar__link {
        display: flex;
        width: 100%;
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-base);
        color: rgba(255, 255, 255, 0.85);
        border-radius: var(--radius-lg);
        position: relative;
    }

    .navbar__link::after {
        content: '';
        display: block;
        position: absolute;
        bottom: 8px;
        left: var(--space-4);
        width: calc(100% - 2 * var(--space-4));
        height: 2px;
        background: var(--gradient-accent, #e07a2a);
        border-radius: var(--radius-full);
    }

    .navbar__link:hover,
    .navbar__link--active {
        color: var(--color-white);
        background-color: rgba(255, 255, 255, 0.08);
    }

    .navbar__item--cta {
        margin-left: 0;
        margin-top: var(--space-4);
        padding-top: var(--space-4);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar__donate-btn {
        width: 100%;
    }

    /* Mobile Menu Overlay */
    .navbar__overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: calc(var(--z-modal) - 1);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-slow);
    }

    .navbar__overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 140px 0 var(--space-16);
        text-align: center;
    }

    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero__content {
        max-width: 100%;
    }

    .hero__badge {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__arrow--prev { left: var(--space-3); }
    .hero__arrow--next { right: var(--space-3); }

    .hero__visual {
        max-width: 300px;
        margin-top: var(--space-8);
    }

    .hero__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__scroll {
        display: none;
    }

    /* Our Story */
    .story__grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .story__media {
        order: -1;
    }

    .story__image {
        height: 350px;
        object-position: top;
    }

    .narrative-visual__image {
        object-position: top;
    }

    .story__stats {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Mission */
    .mission__grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .mission__card {
        padding: var(--space-8);
    }

    /* Programs */
    .programs__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }

    .program-card__content {
        padding: var(--space-6);
    }

    /* Events */
    .events__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .events__grid .event-card:last-child {
        grid-column: span 2;
    }

    .event-card__image {
        height: 180px;
    }

    /* Get Involved */
    .involved__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }

    .involved__card {
        padding: var(--space-6) var(--space-4);
    }

    /* News */
    .news__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news__grid .news-card:last-child {
        grid-column: span 2;
    }

    .news-card__image {
        height: 180px;
    }

    /* Footer */
    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--space-2);
        text-align: center;
    }

    /* Subscribe */
    .subscribe__input-group {
        flex-direction: column;
    }

    .subscribe__button {
        width: 100%;
    }
}

/* =====================================================
   LARGE MOBILE (480px and below)
   ===================================================== */

@media (max-width: 480px) {
    :root {
        --text-5xl: 1.875rem;
        --text-4xl: 1.5rem;
    }

    .hero {
        padding: 120px 0 var(--space-12);
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero__visual {
        max-width: 240px;
    }

    .hero__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .hero__stat {
        padding: var(--space-4) var(--space-3);
    }

    .section__header {
        margin-bottom: var(--space-8);
    }

    /* Story */
    .story__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .story__image {
        height: 280px;
    }

    /* Programs */
    .programs__grid {
        grid-template-columns: 1fr;
    }

    /* Events */
    .events__grid {
        grid-template-columns: 1fr;
    }

    .events__grid .event-card:last-child {
        grid-column: span 1;
    }

    /* Get Involved */
    .involved__grid {
        grid-template-columns: 1fr;
    }

    /* News */
    .news__grid {
        grid-template-columns: 1fr;
    }

    .news__grid .news-card:last-child {
        grid-column: span 1;
    }

    /* Team */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .team-card__photo img {
        height: 240px;
    }

    /* Social */
    .social-cta__links {
        gap: var(--space-3);
    }

    .social-cta__link {
        width: 48px;
        height: 48px;
        font-size: var(--text-lg);
    }

    /* FAQ */
    .faq-item__question {
        padding: var(--space-4) var(--space-4);
        font-size: var(--text-sm);
    }

    .faq-item__answer p {
        padding: 0 var(--space-4) var(--space-4);
        font-size: var(--text-sm);
    }
}

/* =====================================================
   LARGE MOBILE (480px and below)
   ===================================================== */

@media (max-width: 480px) {
    :root {
        --text-5xl: 1.875rem;
        --text-4xl: 1.5rem;
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .hero__visual {
        width: 160px;
        height: 160px;
    }

    .hero__visual-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .section__header {
        margin-bottom: var(--space-8);
    }

    /* Story */
    .story__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Programs */
    .programs__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    /* Events */
    .events__grid {
        grid-template-columns: 1fr;
    }

    .events__grid .event-card:last-child {
        grid-column: span 1;
    }

    /* Get Involved */
    .involved__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    /* News */
    .news__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .news__grid .news-card:last-child {
        grid-column: span 1;
    }

    /* Social */
    .social-cta__links {
        gap: var(--space-3);
    }

    .social-cta__link {
        width: 44px;
        height: 44px;
        font-size: var(--text-lg);
    }
}

/* =====================================================
   LARGE DESKTOP (1280px+)
   ===================================================== */

@media (min-width: 1280px) {
    .container {
        padding: 0 var(--space-8);
    }

    .hero__visual {
        width: 380px;
        height: 380px;
    }
}

/* =====================================================
   EXTRA LARGE SCREENS (1536px+)
   ===================================================== */

@media (min-width: 1536px) {
    .container {
        max-width: var(--container-wide);
    }
}

/* =====================================================
   MOBILE MENU BODY LOCK
   ===================================================== */

/* =====================================================
   PHASE 3 — RESPONSIVE ADDITIONS
   ===================================================== */

@media (max-width: 1024px) {
    .objectives__grid,
    .values__grid,
    .involved-ways__grid,
    .donate-why__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .donate-impact__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .programs-listing__grid,
    .news-listing__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact__grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .event-detail__grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .event-detail__info-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .programs-listing__grid,
    .news-listing__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-hero {
        padding: 100px 0 var(--space-8);
    }

    .page-hero__title {
        font-size: var(--text-3xl);
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 120px 0 var(--space-12);
    }

    .page-hero__meta {
        flex-direction: column;
        gap: var(--space-2);
    }

    .objectives__grid,
    .involved-ways__grid,
    .donate-why__grid {
        grid-template-columns: 1fr;
    }

    .values__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .donate-impact__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .events-listing__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .events-listing__grid--past .event-card__image {
        height: 180px;
    }

    .events-listing__grid--past .event-card:last-child {
        grid-column: span 1;
    }

    .event-card__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .involved-detail__grid,
    .involved-detail__grid--reverse {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        direction: ltr;
    }

    .involved-detail__visual {
        display: none;
    }

    .contact__form-row {
        grid-template-columns: 1fr;
    }

    .register__form-row {
        grid-template-columns: 1fr;
    }

    .register__eligibility-grid {
        grid-template-columns: 1fr;
    }

    .contact__form-wrapper {
        padding: var(--space-6);
    }

    .register__form-wrapper {
        padding: var(--space-6);
    }
}

@media (max-width: 480px) {
    .donate-impact__grid {
        grid-template-columns: 1fr;
    }

    .program-detail__actions {
        flex-direction: column;
    }

    .event-detail__info-row {
        flex-direction: column;
        gap: var(--space-1);
    }

    .event-detail__info-value {
        text-align: left;
    }

    .event-detail__share-links {
        gap: var(--space-2);
    }
}

body.menu-open {
    overflow: hidden;
}

/* =====================================================
   PARTICIPANT PHOTO UPLOAD - RESPONSIVE (Phase 9C)
   ===================================================== */

@media (max-width: 480px) {
    .register__photo-dropzone {
        padding: var(--space-6) var(--space-4);
    }

    .register__photo-actions {
        flex-direction: column;
        width: 100%;
    }

    .register__photo-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .register__photo-preview-img {
        width: 112px;
        height: 112px;
    }
}

/* Menu-open: header must sit above the overlay so the
   mobile menu links are clickable (NOT intercepted by overlay) */
body.menu-open .site-header {
    z-index: calc(var(--z-modal) + 1);
}

/* =====================================================
   EMAIL SUBSCRIPTION - RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    .navbar__logo-name {
        font-size: 15px;
    }

    .subscribe__input-group {
        flex-direction: column;
        gap: var(--space-3);
    }

    .subscribe__button {
        width: 100%;
    }

    .unsubscribe__card {
        padding: var(--space-8) var(--space-6);
    }
}

@media (max-width: 480px) {
    .subscribe__note {
        font-size: var(--text-xs);
    }

    .unsubscribe__actions .btn {
        width: 100%;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    .site-header,
    .site-footer,
    .page-loader,
    .navbar__toggle,
    .hero__visual,
    .donate-cta__bg,
    .social-cta {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .hero {
        min-height: auto;
        padding: 20px 0;
        background: none;
    }

    .fade-in,
    .fade-up,
    .slide-up-container {
        opacity: 1 !important;
        transform: none !important;
    }
}
