/* ===================================================================
 * Template Name: Margarita Contreras - Political Campaign Website
 * Description: Custom CSS for the campaign website.
 * ===================================================================
 *
 * -------------------------------------------------------------------
 * TABLE OF CONTENTS
 * -------------------------------------------------------------------
 *
 * 1.  Root & Global Styles
 * 2.  Helper & Utility Classes
 * 3.  Components
 *     3.1. Buttons
 *     3.2. Cards
 *     3.3. Modals
 * 4.  Page Sections
 *     4.1. Header
 *     4.2. Hero Section
 *     4.3. About Section
 *     4.4. Issues Section
 *     4.5. Press Releases Section
 *     4.6. Social Media Section
 *     4.7. News Section
 *     4.8. Signup Section
 *     4.9. Footer
 * 5.  Dashboard & Other Pages
 *
 * =================================================================== */

/* ===================================================================
 * 1. Root & Global Styles
 * =================================================================== */
:root {
    --dark-blue: #182D56;
    --gold: #FBA931;
    --dark-gray: #1B191A;
    --white: #FFFFFF;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: #f4f4f4;
}

h1,
h2,
h3,
.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

h1,
h2,
h3 {
    color: var(--dark-blue);
}

.logo {
    font-weight: 900;
    text-transform: uppercase;
}

/* ===================================================================
 * 2. Helper & Utility Classes
 * =================================================================== */
.bg-dark-blue {
    background-color: var(--dark-blue) !important;
}

.bg-gold {
    background-color: var(--gold) !important;
}

.bg-dark-gray {
    background-color: var(--dark-gray) !important;
}

.text-gold {
    color: var(--gold) !important;
}

.text-gold:hover {
    color: #fcc25a !important;
}

/* --- Animation for Fade-in Sections --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================================
 * 3. Components
 * =================================================================== */
/* --- 3.1 Buttons --- */
.btn-gold {
    background-color: var(--gold);
    color: var(--dark-blue);
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-gold:hover {
    background-color: var(--dark-blue);
    color: var(--gold);
}

.btn-dark-blue {
    background-color: var(--dark-blue);
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-dark-blue:hover {
    background-color: var(--dark-blue);
    color: var(--gold);
}

.btn-outline-dark-blue {
    color: var(--dark-blue);
    border-color: var(--dark-blue);
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-outline-dark-blue:hover {
    background-color: var(--dark-blue);
    color: var(--gold);
}

/* --- 3.2 Cards --- */
.card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease-out;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(24, 45, 86, 0.15);
}

/* --- 3.3 Modals --- */
.login-modal .modal-content {
    border: 2px solid var(--gold);
    border-radius: 0.5rem;
    /* Consistent with other custom cards */
}

.login-modal .modal-header {
    border-bottom: 1px solid var(--gold);
}

.login-modal .modal-header .modal-title {
    color: var(--white);
    font-weight: 700;
}

.login-modal .modal-body {
    background-color: #f8f9fa;
}

.login-modal .form-label {
    color: var(--dark-blue);
    font-weight: 700;
}

.login-modal .form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.25rem rgba(251, 169, 49, 0.5);
}

.login-modal .modal-footer {
    border-top: 1px solid #dee2e6;
}

/* ===================================================================
 * 4. Page Sections
 * =================================================================== */

/* --- 4.1 Header --- */
.navbar {
    border-bottom: 4px solid var(--gold);
}

.navbar-dark .nav-link:hover {
    color: var(--gold) !important;
}

/* --- 4.2 Hero Section --- */
.hero {
    /* Layered background: image on top, then the gradient, with a fallback color */
    background-color: var(--white);
    background-image:
        url('../img/margarita.png'),
        linear-gradient(to right, rgba(24, 45, 86, 0.95) 30%, rgba(24, 45, 86, 0.5) 60%, rgba(24, 45, 86, 0) 80%),
        url('../img/logo.png');
    background-repeat: no-repeat;
    background-position:
        calc(100%) bottom,
        center;
    background-size:
        auto 95%,
        cover;
    height: 80vh;
    min-height: 650px;
}

.hero h1 {
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.8);
    color: white;
}

.hero-subtitle {
    text-shadow: 2px 2px 10px white;
}

/* Align hero number image to the right on mobile */
@media (max-width: 991.98px) {
    .hero-numero-img {
        display: block;
        margin-left: auto;
        margin-right: 0;
    }
}

/* --- 4.3 About Section --- */
#about .lead {
    max-width: 800px;
}

/* --- Donation CTA Section --- */
.qr-code-img {
    max-width: 180px;
    border: 4px solid var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.video-thumbnail-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 4px solid var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.video-thumbnail-wrapper .play-icon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.video-thumbnail-wrapper:hover .play-icon-overlay {
    background-color: rgba(251, 169, 49, 0.5);
    color: var(--white);
}

/* --- 4.4 Issues Section --- */
#issues .card-header {
    border-bottom: none;
    padding: 1.25rem;
}

#issues .card-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* --- New Accordion Styles for Issues --- */
#issues .issue-card-accordion {
    background-color: white;
    border: 1px solid rgba(251, 169, 49, 0.4); /* gold border with some transparency */
    margin-bottom: 1rem;
    transition: none; /* Disable hover effect for accordion */
}

#issues .issue-card-accordion:hover {
    transform: none;
    box-shadow: none;
}

#issues .issue-card-accordion .card-header {
    background-color: var(--gold);
    color: var(--dark-blue);
    border-bottom: none;
    cursor: pointer;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(251, 169, 49, 0.4);
}

#issues .issue-card-accordion .card-header h3 {
    color: var(--dark-blue);
}

#issues .issue-card-accordion .card-body {
    color: rgba(255, 255, 255, 0.85);
    padding: 1.5rem;
}

#issues .btn-link-gold {
    color: var(--dark-blue);
    text-decoration: none;
    font-size: 1.75rem;
    padding: 0;
}

/* --- 4.5 Press Releases Section --- */
#press-releases .card-header {
    border-bottom: none;
    padding: 1rem 1.25rem;
}

#press-releases .card-header h5 {
    font-size: 1.2rem;
    font-weight: 700;
}

#press-releases .card-header small {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* --- 4.6 Social Media Section --- */
.video-responsive {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
}

.video-responsive .fb-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.instagram-media {
    min-width: auto !important;
    margin: 0 auto;
    /* Center the instagram embeds */
}

/* --- 4.7 News Section --- */
.news-card .card-img-top {
    height: 200px;
    /* A fixed height ensures all card images are uniform. You can adjust this value. */
    width: 100%;
    object-fit: cover;
    /* This ensures the image covers the area, cropping if necessary for a consistent look. */
    background-color: var(--dark-blue);
    /* This will be the fallback color if an image fails to load. */
}

/* --- 4.8 Signup Section --- */
#join .form-control {
    border: 1px solid var(--dark-blue);
}

#join h2,
#join p {
    color: var(--dark-blue);
}

/* --- 4.9 Footer --- */
.main-footer.text-muted,
.main-footer .text-muted {
    /* Override Bootstrap's !important for text-muted */
    color: var(--white) !important;
}

.footer-social {
    display: flex;
    align-items: center;
}

.footer-social a {
    font-size: 1.8rem;
    /* Make icons bigger */
    transition: color 0.3s ease-in-out;
    /* Smooth color transition on hover */
}

.footer-nav a:hover,
.footer-social a:hover {
    color: var(--gold) !important;
}


/* ===================================================================
 * 5. Dashboard & Other Pages
 * =================================================================== */
/* --- Dashboard Styles --- */
.dashboard-body {
    background-color: #f4f7f6;
    /* A light gray for the background */
}

.dashboard-header {
    padding: 2rem 0;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 2rem;
}

.dashboard-header h1,
.dashboard-header h2 {
    color: var(--dark-blue);
}

.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: none;
}

#map {
    height: 60vh;
    /* 60% of the viewport height */
    min-height: 500px;
    width: 100%;
    border: 4px solid var(--dark-blue);
    box-shadow: 0 0 0 4px var(--gold);
    border-radius: 8px;
}

.propuesta-subtitle {
    color: #D4AF37;
    /* gold color */
    font-weight: bold;
    border-bottom: 1px solid #495057;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.propuesta-list {
    list-style-position: outside;
    padding-left: 1.2rem;
}

.propuesta-list li {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: darkgrey;
}


/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    /* Matches .bg-dark-blue */
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.75s ease, visibility 0.75s ease;
    visibility: visible;
    opacity: 1;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

#preloader .preloader-content img {
    width: 200px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}