/* ============================================================
   Mobile styles — isolated from desktop (style3.css)
   All mobile overrides live here. Desktop CSS never changes mobile.
   ============================================================ */

/* Mobile-only elements: hidden on desktop by default */
.subscribe-mobile {
    display: none;
}

/* ── Tablet / narrow desktop (max 900px) ── */
@media (max-width: 900px) {
    .container {
        --container-gutter: 20px;
    }

    .home-intro p {
        font-size: 15px;
    }

    .about-page,
    .subscribe-section,
    .mission-section,
    .contact-section,
    .success-section,
    .payment-page {
        min-height: auto;
    }

    .subscribe-container {
        grid-template-columns: 1fr;
        gap: 14px;
        width: min(100%, 760px);
    }

    .subscribe-icon {
        grid-column: 1;
        grid-row: auto;
        justify-self: end;
        padding-top: 0;
    }

    .subscribe-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .payment-card {
        padding: 16px 18px;
    }

    .amount-options {
        grid-template-columns: repeat(4, auto);
    }
}

/* ── Mobile (max 768px) ── */
@media (max-width: 768px) {

    /* ── Variables ── */
    :root {
        --header-height: 64px;
        --mobile-bottom-stack: 108px;
    }

    body.page-body {
        padding-bottom: var(--mobile-bottom-stack);
    }

    body.page-body.route-subscribe,
    body.page-body.route-contact-us,
    body.page-body.route-donate {
        padding-bottom: 60px;
    }

    body.nav-open .social-sidebar,
    body.nav-open footer {
        display: none;
    }

    .container {
        --container-gutter: 24px;
    }

    /* ── Header ── */
    header .container {
        gap: 14px;
    }

    .logo img {
        height: 36px;
    }

    .menu-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        right: 16px;
        left: auto;
        bottom: auto;
        width: min(240px, calc(100vw - 32px));
        margin: 0;
        padding: 10px 0;
        background: #ffffff;
        border: 1px solid #ececec;
        border-radius: 12px;
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
        z-index: 1002;
        overflow: hidden;
    }

    header.menu-open .site-nav {
        display: block;
    }

    .nav-links {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        font-size: 14px;
    }

    .nav-links a {
        display: block;
        padding: 12px 18px;
        text-align: left;
    }

    .mobile-donate-item {
        display: block;
        margin-top: 6px;
        padding: 0 12px 4px;
    }

    .btn-donate {
        display: none;
    }

    header.menu-open .menu-toggle-bar:nth-child(1) {
        transform: translateY(4.8px) rotate(45deg);
    }

    header.menu-open .menu-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    header.menu-open .menu-toggle-bar:nth-child(3) {
        transform: translateY(-4.8px) rotate(-45deg);
    }

    /* ── Footer & Social ── */
    .social-sidebar {
        right: auto;
        left: 50%;
        top: auto;
        bottom: 38px;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 1px;
        padding: 4px 10px;
        border-radius: 10px;
    }

    .social-icon {
        width: 23px;
        height: 23px;
        font-size: 11px;
    }

    footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 997;
        padding: 9px 0 8px;
        font-size: 9.5px;
    }

    /* ── Page sections: remove min-height ── */
    .home-page,
    .about-page,
    .subscribe-section,
    .mission-section,
    .contact-section,
    .success-section,
    .payment-page {
        min-height: 0;
    }

    /* ── Home page ── */
    .home-page {
        justify-content: flex-start;
        gap: 10px;
        padding-top: 14px;
        padding-bottom: 0;
    }

    .home-intro {
        max-width: 100%;
        margin-top: 30px;
        margin-bottom: 30px;
    }

    .home-intro p {
        font-size: 16px;
        line-height: 1.55;
        font-weight: 600;
    }

    .editions-section {
        width: 100%;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .editions-tabs {
        gap: 12px;
        width: 100%;
        margin-bottom: 10px;
    }

    /* Reset desktop tab margins so they don't squeeze on mobile */
    .tab-btn:first-child {
        margin-left: 0;
    }

    .tab-btn:last-child {
        margin-right: 0;
    }

    .tab-btn {
        font-size: 12px;
        padding-bottom: 7px;
        text-align: center;
    }

    .editions-tabs .tab-btn:not(.active) {
        color: var(--primary-yellow);
    }

    .editions-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding-top: 12px;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    /* Edition card: centered with thicker border */
    .edition-card {
        width: min(100%, 352px);
        margin: 15px auto 0;
        padding: 14px;
        border-radius: 20px;
    }

    /* Reset desktop card margins */
    .edition-card-latest {
        margin-left: auto;
    }

    .edition-card-featured {
        margin-right: auto;
    }

    .edition-card .magazine-cover {
        aspect-ratio: 0.76;
    }

    .edition-card .magazine-cover img {
        border-radius: 12px;
    }

    /* ── About page ── */
    .about-page {
        padding-top: 0;
        padding-bottom: 0;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 0;
    }

    /* Stack image above text — single column */
    .about-top {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    /* Image: shorter height, full-width, rendered above text */
    .about-image {
        order: -1;
        width: 100%;
        height: 200px;
        margin: 0;
    }

    .about-image::before {
        content: none;
    }

    .about-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    /* Text: flush edges, paragraphs end-to-end */
    .about-text {
        padding: 16px var(--container-gutter) 0;
    }

    .about-intro {
        margin-bottom: 12px;
    }

    .about-intro p,
    .editorial-principle {
        font-size: 15px;
        line-height: 1.6;
        max-width: 100%;
    }

    /* Bottom columns: stacked, full-width */
    .about-bottom {
        gap: 16px;
        margin-top: 16px;
        padding: 0 var(--container-gutter);
        grid-template-columns: 1fr;
    }

    .about-column h3 {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .about-column li,
    .about-note p {
        font-size: 14px;
        line-height: 1.55;
    }

    .about-note {
        padding: 14px 16px;
        margin-left: 0;
        margin-top: 0;
    }

    /* ── Subscribe page ── */
    .subscribe-desktop {
        display: none !important;
    }

    .subscribe-mobile {
        display: flex;
        flex-direction: column;
        padding: 36px 22px 0;
        gap: 36px;
    }

    .sm-upper {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .sm-heading {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .sm-heading h2 {
        margin: 0;
        font-size: 26px;
        font-weight: 800;
        line-height: 1.18;
        color: var(--text-dark);
    }

    .sm-free {
        color: var(--primary-red);
    }

    .sm-desc {
        margin: 0 auto;
        max-width: 294px;
        font-size: 18px;
        line-height: 1.45;
        color: var(--text-soft);
    }

    .sm-icon {
        display: block;
        width: 96px;
    }

    .sm-divider {
        display: block;
        width: 100%;
        border: none;
        border-top: 1px solid #e0e0e0;
        margin: 0;
    }

    .sm-lower {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 28px;
    }

    .sm-cta {
        margin: 0 auto;
        max-width: 318px;
        font-size: 18px;
        line-height: 1.45;
        color: var(--text-soft);
    }

    .sm-accent {
        color: var(--primary-green);
        font-weight: 700;
    }

    .sm-phone {
        display: flex;
        align-items: baseline;
        justify-content: center;
        margin: 0;
        font-size: 31px;
        font-weight: 800;
        letter-spacing: -0.025em;
        line-height: 1;
        gap: 0;
    }

    .sm-ph-dark  { color: var(--text-dark); }
    .sm-ph-red   { color: var(--primary-red); }
    .sm-ph-green { color: var(--primary-green); }

    .sm-wa-box {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .sm-wa-row {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 48px;
        padding: 12px 16px;
        border: 1px solid #d2d2d2;
        border-radius: 7px;
        box-sizing: border-box;
    }

    .sm-wa-text {
        width: 100%;
        font-size: 13px;
        line-height: 1.2;
        color: var(--primary-green);
        text-align: center;
    }

    .sm-wa-send {
        width: 100%;
        min-height: 36px;
        background: #9ed8b8;
        color: #ffffff;
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        text-decoration: none;
    }

    /* ── Donate page — mobile-only, desktop untouched ── */
    .mission-section {
        justify-content: flex-start;
        gap: 14px;
        padding-top: 20px;
        padding-bottom: 0;
        min-height: 0;
    }

    .mission-icon-img {
        width: 110px;
    }

    .mission-title {
        max-width: none;
        font-size: 19px;
        line-height: 1.55;
        margin-top: -10px;
    }

    .mission-subtitle {
        max-width: none;
        font-size: 16px;
        line-height: 1.55;
        margin-bottom: 0;
        margin-top: -18px;
    }

    /* Info cards: single column — green card below yellow card */
    .info-cards {
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-width: none;
        width: 100%;
    }

    .card {
        padding: 16px 18px;
    }

    .card h3 {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .card li {
        font-size: 15px;
        line-height: 1.55;
    }

    .large-donate-btn {
        width: 100%;
        min-height: 50px;
        font-size: 17px;
        border-radius: 12px;
        margin-top: 3px;
    }

    /* ── Archive page ── */
    .archive-page {
        padding-top: 14px;
        padding-bottom: 16px;
    }

    .search-bar-wrapper {
        width: 100%;
        margin-bottom: 14px;
    }

    .search-bar {
        height: 36px;
        font-size: 11px;
        padding-left: 38px;
    }

    .search-icon {
        left: 14px;
        font-size: 11px;
    }

    .magazine-grid {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
        margin: 0 auto;
    }

    .magazine-label {
        font-size: 10px;
        margin-bottom: 5px;
    }

    .magazine-item-latest {
        grid-column: 1 / -1;
    }

    .magazine-item-latest .magazine-cover {
        width: 80%;
        margin: 0 auto;
        border-width: 12px;
    }

    .magazine-cover {
        border-width: 10px;
        border-radius: 16px;
    }

    .magazine-date {
        margin-top: 6px;
        font-size: 9.5px;
    }

    .pagination {
        gap: 6px;
        margin-top: 14px;
    }

    .pagination .arrow {
        display: none;
    }

    .pagination a,
    .pagination span {
        width: 10px;
        height: 10px;
        min-width: 10px;
        font-size: 0;
        background: #d4d4d4;
    }

    /* ── Contact page ── */
    .contact-section {
        justify-content: flex-start;
        min-height: 0;
        padding-top: 44px;
        padding-bottom: 0;
    }

    .contact-headline {
        max-width: none;
        margin: 0 0 24px;
        font-size: 33px;
		font-weight: 700;
        text-align: center;
    }

    .contact-sub {
        max-width: none;
        margin: 15px auto 28px;
        font-size: 16px;
        line-height: 1.5;
        text-align: center;
    }

    .form-grid {
        width: 100%;
        gap: 15px;
        grid-template-columns: 1fr;
    }

    .left-inputs {
        display: grid;
        gap: 16px;
    }

    .right-input {
        width: 100%;
    }

    .form-group input,
    .form-group textarea {
        padding: 20px 14px;
        font-size: 14px;
        border-radius: 8px;
        color: #000000;
		border-color: #888888;
    }

    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: #000000;
    }

    .form-group textarea {
        min-height: 130px;
        height: auto;
    }

    .submit-btn {
        width: 100%;
        min-height: 54px;
        margin-top: 14px;
        margin-left: 0;
		border-radius: 12px;
        margin-right: 0;
        font-size: 17px;
		background-color: green
    }

    .ads-email {
        max-width: none;
        margin-top: 28px;
        padding-bottom: 10px;
        font-size: 17px;
        text-align: center;
    }

    /* ── Success / Payment Sent page ── */
    .success-section {
        gap: 10px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .success-icon {
        width: 54px;
        height: 54px;
    }

    .contact-success-icon {
        font-size: 20px;
        border-width: 2px;
    }

    .success-section h1 {
        max-width: 300px;
        font-size: 22px;
    }

    .success-sub {
        max-width: 280px;
        font-size: 14px;
    }

    .btn-back-home {
        min-height: 40px;
        font-size: 14px;
        padding: 0 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .payment-sent-logo {
        width: 165px;
    }

    /* Thank you page (payment-sent) overrides */
    .payment-sent-page {
        padding-top: 0;
        padding-bottom: 0;
    }

    .payment-sent-page .btn-back-home {
        padding: 0 48px;
    }

    /* ── Payment page ── */
    .payment-page {
        justify-content: flex-start;
        padding-bottom: 0;
    }

    .payment-banner {
        padding: 32px 16px;
    }

    .payment-banner h2 {
        font-size: 24px;
        white-space: nowrap;
        color: #7a6800;
    }

    .payment-banner p {
        font-size: 14px;
        color: #000000;
        font-style: italic;
    }

    .payment-form {
        padding: 12px 0 0;
    }

    .payment-card {
        width: 100%;
        padding: 16px 18px;
        border-radius: 22px;
        border: 1px solid #aaaaaa;
    }

    .payment-question {
        font-size: 20px;
        padding: 16px 0 16px;
        width: 100%;
    }

    .amount-display {
        margin-bottom: 8px;
        padding-bottom: 12px;
        border-bottom: 1px solid #aaaaaa;
    }

    .amount-value {
        font-size: 40px;
    }

    .amount-currency {
        font-size: 15px;
    }

    .monthly-donation {
        font-size: 15px;
        margin: 20px 0;
		font-weight: bold
    }

    .amount-options {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding-top: 10px;
    }

    .amount-option {
        font-size: 19px;
		font-weight: 700;
        padding: 8px 6px;
        border: none;
        border-radius: 6px;
        text-align: center;
        color: green;
    }

    .amount-option:not(:last-child)::after {
        display: none;
    }

    .payment-methods {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 20px;
        margin-bottom: 8px;
        margin-left: 20px;
        margin-right: 20px;
		border-radius: 20px;
    }

    .payment-btn {
        min-height: 52px;
        font-size: 15px;
        padding: 16px 14px;
    }

    .payment-btn-paypal {
        border-color: #179bd7;
    }

    .payment-disclaimer {
        width: 100%;
        margin-top: 10px;
        font-size: 11px;
        white-space: normal;
    }

    /* ── Payment banner: use container padding ── */
    .payment-banner {
        padding-left: var(--container-gutter);
        padding-right: var(--container-gutter);
    }

    .payment-form {
        padding-left: var(--container-gutter);
        padding-right: var(--container-gutter);
    }

    .payment-card {
        padding-left: 0;
        padding-right: 0;
    }

    .payment-question {
        padding-left: 0;
        padding-right: 0;
    }

    /* ── Subscribe consent text ── */
    .subscribe-consent {
        font-size: 13px;
		font-weight: bold;
        text-align: center;
        max-width: none;
        padding: 0;
        margin-bottom: 16px;
		margin-top: -5px;
    }
}
