/* =========================================
   1. VARIABLES & BASE STYLES
   ========================================= */
:root {
    --nrj-red: #ff0000;
    --nrj-dark-red: #cc0000;
    --bg-gray: #f2f2f2;
}

body {
    background-color: var(--nrj-red);
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* =========================================
   2. HEADER & HERO SECTION
   ========================================= */

/* Top White Header */
.top-header {
    position: relative;
    z-index: 10;
    background: white;
    padding: 10px 0;
    text-align: center;
}

.top-logo {
    height: 75px;
}

/* Hero Background Wrapper */
.hero-wrapper {
    margin: 0;
    padding: 0;
    background-color: var(--nrj-red);
    background-image: url('img/hero_bg.png');
    background-position: top center;
    background-repeat: no-repeat;
    background-size: min(100%, 1450px) auto;
    overflow: hidden; 
}

/* Hero Banner Container */
.hero-banner-container {
    position: relative;
    max-width: 800px;
    margin: 40px auto 20px auto;
}

/* Hero Image */
.nrj_morning_hero {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 10px;
}

/* Red Text Overlay Box */
.hero-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 30%);
    width: 100%;
    max-width: 632px;
    padding: 20px 30px;
    background-color: var(--nrj-red);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: white;
    text-align: center;
}

.hero-text-overlay h1 {
    margin-bottom: 10px;
    color: white;
    font-size: 2.5rem;
}

.hero-text-overlay h2 {
    margin: 0;
    color: white;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Mobile Adjustment for Hero */
@media (max-width: 576px) {
    .hero-text-overlay {
        padding: 15px;
    }
    .hero-text-overlay h1 {
        
    }
    .hero-text-overlay h2 {
        font-size: 1.5rem;
    }
    .hero-banner-container {
        margin-bottom: 300px;
    }
}

/* =========================================
   3. MAIN CONTENT & CARDS
   ========================================= */
.main-card {
    margin-bottom: 50px;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.campaign-logo {
    width: 120px;
    margin-bottom: 15px;
}

.campaign-title {
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 700;
}

/* =========================================
   4. SOCIAL MEDIA BUTTONS
   ========================================= */
.social-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 15px;
    border: 2px solid black;
    border-radius: 50px;
    background-color: transparent;
    color: black;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s;
    box-sizing: border-box;
}

.social-btn i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.social-btn:hover {
    background-color: black;
    color: white;
}

.social-container .social-btn:last-child {
    grid-column: span 2;
    width: 60%;
    margin: 0 auto;
}

/* =========================================
   5. FORMS
   ========================================= */
.form-container {
    position: relative;
    min-height: 400px;
}

.form-control {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
}

.form-control.is-invalid {
    border-color: var(--nrj-red);
}

.char-count {
    margin-top: -10px;
    margin-bottom: 15px;
    color: #888;
    font-size: 0.8rem;
    text-align: right;
}

.error-message {
    display: none;
    margin-bottom: 15px;
    color: var(--nrj-red);
    font-size: 0.9rem;
}

.error-message i {
    margin-right: 5px;
}

/* Submit Button */
.btn-submit {
    position: relative;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: var(--nrj-red);
    color: white;
    font-weight: bold;
    transition: opacity 0.3s;
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--nrj-dark-red);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.btn-submit .spinner {
    display: none;
    margin-left: 10px;
}

.btn-submit.loading .spinner {
    display: inline-block;
}

.btn-submit.loading .btn-text {
    display: none;
}

/* Form Animations (Fade In/Out) */
.form-content,
.thank-you-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: opacity 0.5s ease-in-out;
    height: 100%;               /* Forces it to take the full 400px height of the parent */
    display: flex;              /* Enables Flexbox */
    flex-direction: column;     /* Stacks children vertically (inputs, buttons) */
    justify-content: center;    /* Centers the content vertically */
}

#finalThankYou {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#finalThankYou.fade-in {
    display: block;
    opacity: 1;
}

.email-followup-content {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.email-followup-content.fade-out {
    opacity: 0;
}

.form-content {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.form-content.fade-out {
    display: none;
}

.thank-you-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    pointer-events: none;  
    opacity: 0;
    text-align: center;
}

.thank-you-message.fade-in {
    opacity: 1;
    pointer-events: auto;  
}

.email-followup-content {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.email-followup-content.fade-out {
    opacity: 0;
    pointer-events: none;  
}

#finalThankYou {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#finalThankYou.fade-in {
    display: block;
    opacity: 1;
}

/* =========================================
   6. TESTIMONIALS (MASONRY) & PAGINATION
   ========================================= */
.testimonials-section {
    padding-bottom: 30px;
    background-color: var(--nrj-red);
}

/* Full Width Pagination Bar */
.pagination-wrapper {
    width: 100%;
    margin-top: 0;
    margin-bottom: 65px;
    padding: 20px 0;
    background-color: rgba(185, 0, 0, 0.8);
}

/* Masonry Grid Setup */
.masonry-grid {
    column-count: 1; /* Mobile default */
    column-gap: 1.5rem;
}

@media (min-width: 992px) {
    .masonry-grid {
        column-count: 3; /* Desktop */
    }
}

.testimonial-card {
    position: relative;
    break-inside: avoid; 
    margin-bottom: 1.5rem;
    padding: 20px;
    background: white;
    border-radius: 12px;
    font-size: 0.9rem;
}

/* Add the tail using the SVG */
.testimonial-card::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: -7px;
    width: 18px;
    height: 18px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNy42OTkyIDBINy42OTkyM1Y4QzcuNjk5MjMgOS42MDI0MSA4LjA3NjEzIDExLjExNjggOC43NDYxMSAxMi40NTkzQzguMTQxNzggMTIuOTA1MSA3LjQ5MTk4IDEzLjMwNjMgNi43OTkwMSAxMy42NTU5QzQuNjE2NzIgMTQuNzU2OCAyLjI3NzMxIDE1LjIwOTUgMCAxNS4wODZDMy41NTM2OSAxNy40MjUzIDguMTI0ODkgMTguMDIzNyAxMi4yOTAzIDE2LjQxMjRDMTMuODQ5NyAxNy40MTcgMTUuNzA2NCAxOCAxNy42OTkyIDE4VjBaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K');
    background-size: contain;
    background-repeat: no-repeat;
}

.testimonial-author {
    margin-top: 10px;
    color: #555;
    font-style: italic;
    font-weight: 600;
    text-align: right;
}

/* Pagination Links */
.pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.pagination .page-link {
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: transparent;
    color: white;
}

.pagination .page-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.pagination .page-item.active .page-link {
    border-color: white;
    background-color: white;
    color: var(--nrj-red);
}

@media (max-width: 576px) {
    .pagination .page-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    position: relative;
    padding: 40px 0;
    background-color: #fff;
    color: #333;
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: justify;
}

.footer-logo {
    display: block;
    height: 75px;
    margin: 0 auto 20px auto;
}

/* =========================================
   8. SKELETON LOADING (Shadow Loading)
   ========================================= */
@keyframes skeletonPulse {
    0%   { opacity: 0.15; }
    50%  { opacity: 0.3; }
    100% { opacity: 0.15; }
}

.skeleton-card {
    padding: 20px;
    background: white;
    border-radius: 12px;
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: #ccc;
    margin-bottom: 10px;
    animation: skeletonPulse 1.4s ease-in-out infinite;
}

.skeleton-line.long   { width: 100%; }
.skeleton-line.medium { width: 75%; }
.skeleton-line.short  { width: 45%; }

.skeleton-author {
    height: 12px;
    width: 80px;
    border-radius: 6px;
    background: #ccc;
    margin-top: 14px;
    margin-left: auto;
    animation: skeletonPulse 1.4s ease-in-out infinite;
}