:root {
    --primary-green: #009639;
    --primary-yellow: #FFD700;
    --text-dark: #000000;
    --text-light: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--text-light);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Loading Animation */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-green);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease; /* Reduced duration for faster fade */
}

.loader-wrapper.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-text {
    color: var(--primary-yellow);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-yellow);
    border-top: 4px solid var(--text-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navbar */
.navbar {
    background: linear-gradient(90deg, var(--primary-green) 50%, var(--primary-yellow) 50%);
    padding: 12px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar-brand {
    color: var(--text-light) !important;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.nav-link {
    color: var(--text-light) !important;
    font-size: 0.9rem;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 8px 12px;
}

.nav-link:hover {
    color: var(--text-dark) !important;
    transform: scale(1.05);
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-yellow) 50%, var(--primary-green) 50%);
    color: var(--text-light);
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero .particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.hero .particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    animation: float 4s infinite ease-in-out;
}

.hero .particle:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.hero .particle:nth-child(2) { top: 20%; left: 20%; animation-delay: 0.3s; }
.hero .particle:nth-child(3) { top: 30%; left: 30%; animation-delay: 0.6s; }
.hero .particle:nth-child(4) { top: 40%; left: 40%; animation-delay: 0.9s; }
.hero .particle:nth-child(5) { top: 50%; left: 50%; animation-delay: 1.2s; }
.hero .particle:nth-child(6) { top: 60%; left: 60%; animation-delay: 1.5s; }
.hero .particle:nth-child(7) { top: 70%; left: 70%; animation-delay: 1.8s; }
.hero .particle:nth-child(8) { top: 80%; left: 80%; animation-delay: 2.1s; }
.hero .particle:nth-child(9) { top: 15%; left: 90%; animation-delay: 2.4s; }
.hero .particle:nth-child(10) { top: 25%; left: 15%; animation-delay: 2.7s; }

@keyframes float {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-25px); opacity: 0.9; }
}

@keyframes sunGlow {
    0% { box-shadow: 0 0 20px rgba(255,215,0,0.8); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(255,215,0,1); transform: scale(1.25); }
    100% { box-shadow: 0 0 20px rgba(255,215,0,0.8); transform: scale(1); }
}

/* Wave Animation */
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 80px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23009639' fill-opacity='0.8' d='M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,224C672,245,768,267,864,245.3C960,224,1056,160,1152,149.3C1248,139,1344,181,1392,202.7L1440,224V320H1392C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320H0V224Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: 50% 100%;
    animation: waveAnimation 7s linear infinite;
}

.wave:nth-child(2) {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23FFD700' fill-opacity='0.6' d='M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,224C672,245,768,267,864,245.3C960,224,1056,160,1152,149.3C1248,139,1344,181,1392,202.7L1440,224V320H1392C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320H0V224Z'%3E%3C/path%3E%3C/svg%3E");
    animation: waveAnimationReverse 10s linear infinite;
}

@keyframes waveAnimation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes waveAnimationReverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.jio-branding {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    z-index: 2;
    position: relative;
}

.jio-circle {
    width: 50px;
    height: 50px;
    background-color: var(--primary-green);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.jio-circle:hover {
    transform: scale(1.1);
}

.hero-content {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInContent 1s ease forwards;
    animation-delay: 0.5s;
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-shadow: 2px 2px 10px rgba(255,255,255,0.8);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 20px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.2);
    font-weight: 400;
}

.hero .btn {
    background-color: var(--text-light);
    color: var(--primary-green);
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero .btn:hover {
    background-color: var(--primary-yellow);
    color: var(--text-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@keyframes fadeInContent {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* General Section Styling */
.section {
    padding: 40px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInSection {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: transparent;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-yellow));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
    padding-bottom: 8px;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-yellow));
    border-radius: 2px;
}

.fuel-rates, .offers, .contact {
    background-color: var(--text-light);
}

.fuel-rates .card, .offers .card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
}

.fuel-rates .card:hover, .offers .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-support, .btn-complaint, .btn-feedback {
    background-color: var(--primary-green);
    color: var(--text-light);
    margin: 8px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-support:hover, .btn-complaint:hover, .btn-feedback:hover {
    background-color: var(--primary-yellow);
    color: var(--text-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-feedback i {
    margin-right: 6px;
}

/* Ensure Bootstrap .btn-primary consistency for thankyou.html */
.btn-primary {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--text-light);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-yellow);
    border-color: var(--primary-yellow);
    color: var(--text-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Carousel Section */
.carousel-section {
    padding: 30px 0;
    background-color: #f8f8f8;
}

.carousel-item img {
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    width: 100%;
}

.carousel-control-prev, .carousel-control-next {
    background-color: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.carousel-control-prev:hover, .carousel-control-next:hover {
    background-color: rgba(0,0,0,0.7);
}

/* Modal Styling */
.modal-content {
    border-radius: 8px;
    border: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background-color: var(--primary-green);
    color: var(--text-light);
}

.modal-body {
    background-color: var(--text-light);
}

.form-control, .form-select {
    border-radius: 5px;
    margin-bottom: 12px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-green), #005b24);
    color: var(--text-light);
    padding: 30px 0;
    text-align: center;
    position: relative;
}

.footer a {
    color: var(--primary-yellow);
    text-decoration: none;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: var(--text-light);
    transform: scale(1.1);
}

.footer p {
    margin: 5px 0;
    font-size: 0.85rem;
}

.footer .powered-by {
    font-weight: 600;
    color: var(--primary-yellow);
    animation: pulse 2s infinite;
}

.back-to-top {
    position: fixed;
    right: 15px;
    bottom: 15px;
    background-color: var(--primary-yellow);
    color: var(--primary-green);
    padding: 12px;
    border-radius: 50%;
    transition: all 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    animation: bounce 2s infinite;
}

.back-to-top:hover {
    background-color: var(--text-light);
    transform: scale(1.2);
    animation-play-state: paused;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Mobile-First Media Queries */
@media (min-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }

    .nav-link {
        font-size: 1rem;
    }

    .hero {
        padding: 120px 0;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero p {
        font-size: 1.5rem;
    }

    .hero .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .jio-circle {
        width: 60px;
        height: 60px;
        font-size: 1rem;
    }

    .section h2 {
        font-size: 2.2rem;
    }

    .carousel-item img {
        height: 400px;
    }
}

@media (min-width: 992px) {
    .hero {
        padding: 150px 0;
    }

    .hero h1 {
        font-size: 4rem;
    }

    .hero p {
        font-size: 1.8rem;
    }

    .section h2 {
        font-size: 2.5rem;
    }
}