/* ==========================================================================
   Dan Norton for NY State Assembly - Campaign Website Styles
   ========================================================================== */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --bluebird: #094074;
    --bluebird-dark: #062a4d;
    --sunflower: #F7B538;
    --pacific: #00A9B8;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: #1a1a1a;
    line-height: 1.6;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    background: linear-gradient(155deg, var(--bluebird) 0%, var(--bluebird-dark) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Subtle gradient accent */
.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(0, 169, 184, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out both;
}

.hero-logo {
    margin-bottom: 2.5rem;
    animation: fadeIn 0.6s ease-out both;
}

.hero-logo img {
    height: 120px;
    width: auto;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.5rem;
    max-width: 480px;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-image {
    position: relative;
    animation: scaleIn 0.9s ease-out 0.2s both;
}

.hero-image img {
    width: 100%;
    max-width: 420px;
    border-radius: 8px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 2;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: -16px;
    right: -16px;
    width: calc(100% - 30px);
    max-width: 390px;
    height: calc(100% + 32px);
    border: 3px solid var(--sunflower);
    border-radius: 8px;
    z-index: 1;
}

/* Decorative element */
.hero-image::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--pacific) 0%, transparent 60%);
    border-radius: 50%;
    opacity: 0.4;
    z-index: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
    background: var(--sunflower);
    color: var(--bluebird);
    padding: 1.1rem 2.5rem;
    border: none;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(247, 181, 56, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(247, 181, 56, 0.4);
}

.btn-donate-large {
    background: var(--sunflower);
    color: var(--bluebird);
    padding: 1.25rem 3rem;
    border: none;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-volunteer {
    background: transparent;
    color: var(--white);
    padding: 1.25rem 2.5rem;
    border: 2px solid var(--white);
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.btn-volunteer-hero {
    background: transparent;
    color: var(--white);
    padding: 1.1rem 2.5rem;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.btn-volunteer-hero:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Newsletter Section
   ========================================================================== */
.newsletter {
    background: var(--pacific);
    padding: 4rem 2rem;
}

.newsletter-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.newsletter h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.newsletter p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 550px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 280px;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
}

.newsletter-form input[type="email"]::placeholder {
    color: #999;
}

.newsletter-form button {
    background: var(--bluebird);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.newsletter-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.form-message.success {
    color: #22c55e;
}

.form-message.error {
    color: #ef4444;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    padding: 6rem 2rem;
    background: var(--white);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(9, 64, 116, 0.15);
}

.section-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pacific);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--bluebird);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.about-text > p {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 1.25rem;
}

/* Bio Dropdown */
.bio-dropdown {
    margin: 2rem 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.bio-dropdown summary {
    padding: 1rem 1.5rem;
    background: var(--light-gray);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--bluebird);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
}

.bio-dropdown summary::-webkit-details-marker {
    display: none;
}

.bio-dropdown summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--pacific);
    transition: transform 0.3s ease;
}

.bio-dropdown[open] summary::after {
    content: '−';
}

.bio-dropdown summary:hover {
    background: #eef1f4;
}

.bio-content {
    padding: 1.5rem;
    background: var(--white);
    max-height: 400px;
    overflow-y: auto;
}

.bio-content p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.bio-content p:last-child {
    margin-bottom: 0;
}

/* Custom scrollbar for bio content */
.bio-content::-webkit-scrollbar {
    width: 6px;
}

.bio-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bio-content::-webkit-scrollbar-thumb {
    background: var(--pacific);
    border-radius: 3px;
}

.bio-content::-webkit-scrollbar-thumb:hover {
    background: var(--bluebird);
}

.credentials {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.credential {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.credential-icon {
    width: 48px;
    height: 48px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bluebird);
}

.credential-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bluebird);
}

/* ==========================================================================
   Priorities Section
   ========================================================================== */
.priorities {
    padding: 6rem 2rem;
    background: var(--light-gray);
}

.priorities-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.priorities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.priority-item {
    background: var(--white);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(9, 64, 116, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.priority-item svg {
    width: 48px;
    height: 48px;
    color: var(--bluebird);
}

.priority-item span {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--pacific);
}

/* ==========================================================================
   CTA / Donate Section
   ========================================================================== */
.cta {
    padding: 6rem 2rem;
    background: var(--bluebird);
    text-align: center;
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 169, 184, 0.15) 50%, transparent 70%);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: #062a4d;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 56px;
    width: auto;
}

.footer-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.social-link {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
}

.disclaimer {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-close:hover {
    color: var(--bluebird);
}

.modal-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bluebird);
    margin-bottom: 1rem;
}

.modal-content p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.modal-content address {
    font-style: normal;
    font-size: 1.1rem;
    color: var(--bluebird);
    line-height: 1.8;
    background: var(--light-gray);
    padding: 1.25rem;
    border-radius: 8px;
}

.modal-content address strong {
    font-weight: 700;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 968px) {
    .hero {
        min-height: auto;
        padding: 3rem 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
        padding: 2rem 1.5rem;
    }

    /* Logo and text ABOVE the headshot on mobile */
    .hero-text { order: 1; }
    .hero-image { order: 2; }

    .hero-logo {
        display: flex;
        justify-content: center;
    }

    .hero-logo img {
        height: 100px;
    }

    .hero-image {
        display: flex;
        justify-content: center;
    }

    .hero-image::before { display: none; }
    .hero-image::after { display: none; }
    .hero-image img { max-width: 300px; }

    .hero-subtitle {
        margin: 0 auto 2rem;
        font-size: 1.25rem;
        font-weight: 500;
    }

    .hero-buttons { justify-content: center; }

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

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

@media (max-width: 600px) {
    .hero-content {
        padding: 1.5rem 1rem;
    }

    .hero-logo img {
        height: 80px;
    }

    .hero-subtitle {
        font-size: 1.15rem;
        font-weight: 500;
    }

    /* Full-width buttons on small screens for easy tapping */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-volunteer-hero {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }

    .section-title { font-size: 1.75rem; }
    .cta h2 { font-size: 1.75rem; }

    .newsletter-form { flex-direction: column; }
    .newsletter-form input[type="email"] { min-width: 100%; }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn-donate-large,
    .cta-buttons .btn-volunteer {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .credentials {
        flex-direction: column;
        gap: 1rem;
    }

    .about {
        padding: 4rem 1.5rem;
    }

    .priorities {
        padding: 4rem 1.5rem;
    }

    .cta {
        padding: 4rem 1.5rem;
    }
}
