/* Color Palette */
:root {
    --primary-blue: #082236;
    --primary-red: #9c2d2f;
    --dark-red: #7a2426;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --text-dark: #1a1a1a;
    --text-light: #6b7280;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.16);
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #fafafa;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero Section */
.hero-section {
    background: var(--primary-blue);
    color: var(--white);
    padding: 120px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* box-shadow: 0 4px 20px rgba(0,0,0,0.15); */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 100%;
    height: 200%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,213.3C672,224,768,224,864,208C960,192,1056,160,1152,149.3C1248,139,1344,149,1392,154.7L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat;
    opacity: 0.3;
    transform: rotate(-5deg);
}

.hero-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: -2px;
    /* text-shadow: 2px 4px 8px rgba(0,0,0,0.2); */
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-stars {
    font-size: 2.5rem;
    color: #fff;
    /* text-shadow: 2px 2px 4px rgba(0,0,0,0.3); */
    letter-spacing: 10px;
    animation: fadeIn 1s ease-out 0.3s both;
}

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

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 20px;
    opacity: 0.95;
    letter-spacing: 0.5px;
    animation: fadeIn 1s ease-out 0.5s both;
}

/* Explainer Section */
.explainer-section {
    padding: 80px 0;
    background: var(--light-gray);
    position: relative;
}

.explainer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.social-posts-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.social-posts-wrapper .twitter-tweet {
    margin: 0 auto !important;
}

.social-posts-wrapper iframe {
    max-width: 100% !important;
    border-radius: 12px;
    /* box-shadow: 0 10px 30px rgba(0,0,0,0.1); */
}

.explainer-text {
    font-size: 1.375rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-dark);
    line-height: 1.9;
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* Representatives Section */
.representatives-section {
    padding: 100px 0;
    background-color: #ffffff;
    position: relative;
}

.section-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 60px;
    letter-spacing: -1px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 2px;
}

.representatives-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 800px;
    overflow-y: auto;
    padding: 15px;
    background-color: var(--light-gray);
    border-radius: 12px;
    /* box-shadow: inset 0 2px 8px rgba(0,0,0,0.04); */
}

.representatives-grid::-webkit-scrollbar {
    width: 8px;
}

.representatives-grid::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 4px;
}

.representatives-grid::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

.rep-name {
    background-color: var(--white);
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    /* box-shadow: var(--shadow-sm); */
}

.rep-name:hover {
    background-color: var(--light-gray);
    transform: translateY(-2px);
    /* box-shadow: var(--shadow-md); */
    border-color: var(--primary-red);
}

/* Texas Flag Map Icon */
.texas-flag-map {
    width: 20px;
    height: 20px;
    max-width: 20px;
    flex-shrink: 0;
    margin-right: 4px;
}

/* Action Card */
.action-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    /* box-shadow: var(--shadow-xl); */
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-red);
}

@media (max-width: 768px) {
    .action-card {
        padding: 35px 25px;
    }
}

@media (max-width: 991px) {
    .action-card {
        margin-bottom: 40px;
    }
}

.sticky-form {
    position: sticky;
    top: 20px;
}

.action-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 10px;
}

.action-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    font-weight: 400;
    letter-spacing: -0.02em;
    max-width: 600px;
    margin: 0 auto;
}

/* Form Styles */
.form-group {
    margin-bottom: 30px;
}

.form-label-custom {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.form-control-custom {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-control-custom:focus {
    border-color: var(--primary-blue);
    /* box-shadow: 0 0 0 0.2rem rgba(17, 46, 81, 0.1); */
}

/* Consent Checkbox */
.form-check {
    margin-bottom: 1.5rem;
    margin-top: 1rem;
}

.form-check-input {
    float: left;
    margin-right: 0.5rem;
}

.form-check-label {
    display: block;
    margin-left: 1.5rem;
}

/* Email Preview */
.email-preview {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    margin-top: 20px;
    /* box-shadow: var(--shadow-md); */
    position: relative;
}

.email-preview::before {
    content: 'EMAIL TEMPLATE';
    position: absolute;
    top: -12px;
    left: 30px;
    background: var(--white);
    padding: 0 15px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 1px;
}

.email-preview h4 {
    display: none;
}

.preview-content {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.preview-body {
    font-size: 1rem;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 15px;
    color: var(--text-dark);
}

.preview-body::-webkit-scrollbar {
    width: 8px;
}

.preview-body::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 4px;
}

.preview-body::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

.preview-body ul {
    margin: 15px 0;
    padding-left: 25px;
}

/* reCAPTCHA v3 Badge */
.grecaptcha-badge {
    visibility: visible !important;
}

/* reCAPTCHA Notice */
.recaptcha-notice {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    margin: 20px 0;
    padding: 10px;
    background-color: var(--light-gray);
    border-radius: 6px;
}

/* Keep existing btn-action styles for other uses */

/* Progress Section */
.progress-section {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.progress-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 40px;
    /* box-shadow: 0 10px 30px rgba(0,0,0,0.1); */
}

.progress-card h3 {
    font-family: 'Spectral', Georgia, serif;
    color: var(--primary-blue);
    margin-bottom: 30px;
    text-align: center;
}

.custom-progress {
    background-color: #e0e0e0;
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.custom-progress-bar {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1a4370 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    position: relative;
}

.progress-percent {
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
}

.progress-text {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.sending-log {
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.sending-log .success {
    color: #2e7d32;
}

.sending-log .error {
    color: var(--primary-red);
}

/* Alert Container */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert {
    margin-bottom: 15px;
    border-radius: 8px;
    padding: 15px 20px;
    /* box-shadow: 0 5px 20px rgba(0,0,0,0.1); */
    animation: slideIn 0.3s ease;
}

/* Footer */
.site-footer {
    background: var(--primary-blue);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    /* box-shadow: 0 -4px 20px rgba(0,0,0,0.1); */
}

.site-footer p {
    margin-bottom: 5px;
}

.site-footer .small {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Modal Overrides */
.modal-content {
    border-radius: 20px;
    border: none;
    /* box-shadow: var(--shadow-xl); */
    overflow: hidden;
}

.modal-header {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 24px 32px;
}

.modal-title {
    font-family: 'Spectral', Georgia, serif;
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: -0.5px;
}

/* Action Header */
.action-header {
    text-align: center;
    margin-bottom: 35px;
}

.action-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

/* Steps Container */
.steps-container {
    margin: 30px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.step-card {
    background: var(--white);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.step-card:hover {
    border-color: var(--primary-red);
    transform: translateX(5px);
    /* box-shadow: var(--shadow-md); */
}

.step-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.step-card:hover::before {
    width: 5px;
}

.step-number {
    background: var(--primary-red);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    /* box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25); */
}

.step-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0 0 4px 0;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.4;
}

.step-card-content {
    flex: 1;
}

/* Action Buttons */
.action-buttons {
    text-align: center;
    margin: 30px 0 25px;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.3px;
    /* box-shadow: 0 4px 16px rgba(220, 38, 38, 0.25); */
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    /* box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4); */
    background: var(--dark-red);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Subject Line Box */
.subject-line-box {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0 20px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.subject-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.subject-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 991px) {
    .representatives-grid {
        max-height: 400px;
        margin-bottom: 30px;
    }
    
    .sticky-form {
        position: relative;
        top: 0;
    }
}

.modal-body {
    padding: 32px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.modal-body ol {
    margin: 20px 0;
    padding-left: 24px;
}

.modal-body li {
    margin-bottom: 12px;
}

.modal-footer {
    padding: 20px 32px;
    background-color: var(--light-gray);
    border-top: 1px solid var(--border-color);
}

/* Texas Flag Icon for Steps */
.step-card::after {
    content: '★';
    position: absolute;
    top: 8px;
    right: 10px;
    color: var(--primary-red);
    opacity: 0.08;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .action-title {
        font-size: 2rem;
    }
    
    .action-card {
        padding: 30px 20px;
    }
    
    .btn-action {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
    
    .rep-name {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
    
    .texas-flag-map {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .representatives-grid {
        max-height: 300px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* Representatives Title */
.reps-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 20px;
    text-align: center;
}

/* Footer Enhancements */
.footer-stars {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 8px;
    margin-bottom: 20px;
}

.footer-main {
    font-size: 1.125rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.footer-link {
    color: var(--white);
    text-decoration: none;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--white);
    border-bottom-color: var(--white);
}

.footer-disclaimer {
    font-size: 0.875rem;
    opacity: 0.7;
    margin-bottom: 8px;
}

/* Additional Polish */
::selection {
    background-color: var(--primary-red);
    color: var(--white);
}