/* Basic Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Define the new red accent color (This will be common for all themes where red is an accent) */
:root {
    --primary-red: #c90000; /* A professional, slightly muted red */
    --light-red: #ff3333; /* For subtle highlights/hovers */
}

/* Base variables (default to dark theme if no class is applied) */
body {
    --primary-text-color: #fff;
    --secondary-text-color: #cccccc;
    --background-color: #0d0d0d;
    --section-background: #1a1a1a;
    --card-background: #0d0d0d;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --header-bg: #0d0d0d;
    --hero-image-filter: brightness(0.7);
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for theme change */
}


/* Dark Theme (existing theme) */
body.dark-theme {
    --primary-text-color: #fff;
    --secondary-text-color: #cccccc;
    --background-color: #0d0d0d;
    --section-background: #1a1a1a;
    --card-background: #0d0d0d;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --header-bg: #0d0d0d;
    --hero-image-filter: brightness(0.7);
}


/* Light Theme */
body.light-theme {
    --primary-text-color: #333;
    --secondary-text-color: #777;
    --background-color: #fff;
    --section-background: #f8f8f8;
    --card-background: #fff;
    --border-color: #eee;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-bg: rgba(255, 255, 255, 0.95);
    --hero-image-filter: none;
}

/* Red Theme */
body.red-theme {
    --primary-text-color: #fff;
    --secondary-text-color: #ffe0e0;
    --background-color: #8B0000; /* Dark Red */
    --section-background: #A52A2A; /* Brownish Red */
    --card-background: #C70039; /* Deeper Red */
    --border-color: #FF6347; /* Tomato Red */
    --shadow-color: rgba(139, 0, 0, 0.4);
    --header-bg: #8B0000;
    --hero-image-filter: brightness(0.8) contrast(1.1);
}

/* Green Theme */
body.green-theme {
    --primary-text-color: #fff;
    --secondary-text-color: #e0ffe0;
    --background-color: #006400; /* Dark Green */
    --section-background: #228B22; /* Forest Green */
    --card-background: #3CB371; /* Medium Sea Green */
    --border-color: #6B8E23; /* Olive Drab */
    --shadow-color: rgba(0, 100, 0, 0.4);
    --header-bg: #006400;
    --hero-image-filter: brightness(0.8) contrast(1.1);
}

/* Yellow Theme */
body.yellow-theme {
    --primary-text-color: #333; /* Darker text for light background */
    --secondary-text-color: #555;
    --background-color: #FFD700; /* Gold */
    --section-background: #FFDD33; /* Lighter Yellow */
    --card-background: #FFEE66; /* Even Lighter Yellow */
    --border-color: #FFA500; /* Orange */
    --shadow-color: rgba(255, 215, 0, 0.4);
    --header-bg: #FFD700;
    --hero-image-filter: none;
}

/* Pink Theme */
body.pink-theme {
    --primary-text-color: #333;
    --secondary-text-color: #666;
    --background-color: #FFC0CB; /* Pink */
    --section-background: #FFB6C1; /* Light Pink */
    --card-background: #FFDAB9; /* Peach Puff (for contrast) */
    --border-color: #FF69B4; /* Hot Pink */
    --shadow-color: rgba(255, 192, 203, 0.4);
    --header-bg: #FFC0CB;
    --hero-image-filter: none;
}

/* Chocolate Theme */
body.chocolate-theme {
    --primary-text-color: #fff;
    --secondary-text-color: #e6d8c0;
    --background-color: #5A352A; /* Dark Chocolate */
    --section-background: #6B4436; /* Medium Chocolate */
    --card-background: #7F5547; /* Lighter Chocolate */
    --border-color: #A0522D; /* Sienna */
    --shadow-color: rgba(90, 53, 42, 0.4);
    --header-bg: #5A352A;
    --hero-image-filter: brightness(0.8) contrast(1.1);
}


/* --- Ab neeche wale CSS rules mein koi change nahi karna, yeh variables use kar rahe hain --- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* General Section Styling */
.section-padding {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-text-color); /* Use variable */
}

.section-header p {
    font-size: 20px;
    color: var(--secondary-text-color); /* Use variable */
}

.text-center {
    text-align: center;
}

/* Header Styling */
.header {
    background-color: var(--header-bg); /* Use variable */
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color); /* Use variable */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-text-color); /* Logo color changes with theme */
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--secondary-text-color); /* Use variable */
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav a:hover {
    color: var(--primary-text-color); /* Use variable */
}

.nav a .fas {
    font-size: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Theme Selector Button Style */
.theme-selector-btn {
    /* Ab background-color ko theme variable se lenge */
    background-color: var(--background-color); /* Button ka background current theme ke background color jaisa hoga */
    color: var(--primary-text-color); /* Icon aur text ka color primary text color jaisa hoga */
    border: 1px solid var(--border-color); /* Border color theme ke border color jaisa hoga */
    padding: 8px 15px;
    font-size: 1.1em;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 5px var(--shadow-color); /* Thora sa shadow bhi add kar dein */
}

.theme-selector-btn:hover {
    /* Hover par button ka background thora change ho jaye, primary-text-color use kar lete hain */
    background-color: var(--primary-text-color);
    color: var(--background-color); /* Hover par text color background color ho jaye */
    border-color: var(--primary-text-color); /* Border color bhi change ho jaye */
}

/* Aur yeh bhi update karein taake light themes mein hover acha lage */
body.light-theme .theme-selector-btn:hover,
body.yellow-theme .theme-selector-btn:hover,
body.pink-theme .theme-selector-btn:hover {
    background-color: var(--primary-text-color); /* Example: light theme mein yeh #333 hoga */
    color: var(--background-color); /* Example: light theme mein yeh #fff hoga */
    border-color: var(--primary-text-color);
}
/* For light themes with dark primary text, when hovered, button becomes dark with light text. */
/* For dark themes with light primary text, when hovered, button becomes light with dark text. */


.theme-selector-btn .fas {
    font-size: 1.2em;
}


.header-actions .donate-btn-header {
    background-color: var(--primary-red);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.header-actions .donate-btn-header:hover {
    background-color: var(--light-red);
}

/* Hero Section */
.hero-section {
    background-color: var(--background-color); /* Use variable */
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding-top: 50px;
    padding-bottom: 50px;
}

.hero-text-container {
    flex: 1;
    max-width: 55%;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-text-container h1 {
    font-size: 60px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
    color: var(--primary-text-color); /* Use variable */
}

.hero-text-container p {
    font-size: 18px;
    color: var(--secondary-text-color); /* Use variable */
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.btn {
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.find-out-btn {
    background-color: var(--primary-red);
    color: #fff;
}

.find-out-btn:hover {
    background-color: var(--light-red);
}

.donate-btn {
    background-color: transparent;
    color: var(--primary-red);
    border-color: var(--primary-red);
}

.donate-btn:hover {
    background-color: var(--primary-red);
    color: #fff;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-dog-image {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    filter: var(--hero-image-filter); /* Use variable */
    transition: filter 0.3s ease;
}

/* Pagination - FIXED STYLING */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: auto;
    padding-left: 20px;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.pagination-arrow {
    color: var(--secondary-text-color); /* Use variable */
    font-size: 16px;
    cursor: pointer;
    margin: 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-arrow .fas {
    font-size: 12px;
}

.pagination-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: var(--border-color); /* Use variable */
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--primary-red);
}


/* --- NEW SECTIONS STYLING --- */

/* About Us Section */
.about-us-section {
    background-color: var(--section-background); /* Use variable */
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 2;
}

.about-text p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--secondary-text-color); /* Use variable */
    margin-bottom: 20px;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--shadow-color); /* Use variable */
}


/* How It Works Section */
.how-it-works-section {
    background-color: var(--background-color); /* Use variable */
}

.process-steps {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}

.step-card {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    background-color: var(--section-background); /* Use variable */
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow-color); /* Use variable */
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-card i {
    color: var(--primary-red);
    margin-bottom: 20px;
    font-size: 60px;
}

.step-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-text-color); /* Use variable */
}

.step-card p {
    color: var(--secondary-text-color); /* Use variable */
    font-size: 16px;
}


/* Featured Pets Section */
.featured-pets-section {
    background-color: var(--section-background); /* Use variable */
}

.pet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.pet-card {
    background-color: var(--card-background); /* Use variable */
    border-radius: 8 speedily8px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color); /* Use variable */
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease;
}

.pet-card:hover {
    transform: translateY(-5px);
}

.pet-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    margin-bottom: 15px;
}

.pet-card h3 {
    font-size: 24px;
    color: var(--primary-text-color); /* Use variable */
    margin-bottom: 10px;
}

.pet-card p {
    color: var(--secondary-text-color); /* Use variable */
    font-size: 15px;
    margin-bottom: 20px;
}

.pet-card .btn {
    padding: 10px 20px;
    font-size: 15px;
}


/* Testimonials Section */
.testimonials-section {
    background-color: var(--background-color); /* Use variable */
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--section-background); /* Use variable */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--shadow-color); /* Use variable */
}

.testimonial-card p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--secondary-text-color); /* Use variable */
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-card h4 {
    font-size: 18px;
    color: var(--primary-red);
    text-align: right;
}


/* Call to Action Section */
.cta-section {
    background-color: var(--primary-red);
    color: #fff;
    text-align: center;
    padding: 60px 0;
}

.cta-section h2 {
    font-size: 42px;
    margin-bottom: 15px;
    color: #fff;
}

.cta-section p {
    font-size: 20px;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.9);
}

.cta-buttons .btn {
    background-color: #fff;
    color: var(--primary-red);
    border-color: #fff;
}

.cta-buttons .btn:hover {
    background-color: var(--dark-gray); /* In light theme, this might be too dark. Consider a light-theme specific override if needed. */
    color: #fff;
    border-color: var(--dark-gray);
}

/* Light theme specific override for CTA buttons if --dark-gray is too dark for light theme. */
body.light-theme .cta-buttons .btn:hover {
    background-color: #ddd; /* Lighter grey for hover in light theme */
    color: var(--primary-red);
    border-color: #ddd;
}


.cta-buttons .donate-btn {
    background-color: transparent;
    color: #fff;
    border-color: #fff;
}

.cta-buttons .donate-btn:hover {
    background-color: #fff;
    color: var(--primary-red);
}


/* --- FOOTER STYLING --- */
.footer {
    background-color: var(--background-color); /* Use variable */
    color: var(--secondary-text-color); /* Use variable */
    padding-top: 60px;
    border-top: 1px solid var(--border-color); /* Use variable */
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 22px;
    color: var(--primary-text-color); /* Use variable */
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-red);
}

.footer-column p {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: var(--secondary-text-color); /* Use variable */
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 15px;
}

.footer-column ul li a:hover {
    color: var(--primary-red);
}

.footer-column p .fas {
    margin-right: 10px;
    color: var(--primary-red);
}

.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: var(--primary-text-color); /* Use variable */
    font-size: 24px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-red);
    transform: translateY(-3px);
}

.footer-bottom {
    background-color: var(--card-background); /* Using card-background for footer bottom */
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid var(--border-color); /* Using border-color */
}

.footer-bottom p {
    margin: 0;
    color: var(--secondary-text-color); /* Use variable */
}

.footer-bottom a {
    color: var(--secondary-text-color); /* Use variable */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--primary-red);
}


/* Responsive Design - Keep previous media queries and add adjustments */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text-container {
        max-width: 90%;
        padding-right: 0;
        align-items: center;
    }

    .hero-dog-image {
        max-width: 80%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .pagination {
        position: static;
        justify-content: center;
        margin-top: 30px;
        width: 100%;
        transform: none;
        padding-left: 0;
    }

    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-text, .about-image {
        flex: none;
        max-width: 100%;
    }
    .about-image img {
        margin-top: 30px;
    }

    .process-steps {
        flex-direction: column;
        align-items: center;
    }
    .step-card {
        max-width: 80%;
    }

    .pet-grid, .testimonial-grid, .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-column {
        text-align: center;
    }
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
    .section-header h2 {
        font-size: 38px;
    }
    .section-header p {
        font-size: 18px;
    }
    .hero-text-container h1 {
        font-size: 45px;
    }

    .hero-text-container p {
        font-size: 16px;
    }

    .btn {
        padding: 12px 25px;
        font-size: 14px;
    }

    .cta-section h2 {
        font-size: 32px;
    }
    .cta-section p {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .hero-text-container h1 {
        font-size: 35px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .nav ul {
        flex-direction: column;
        align-items: center;
    }

    .header-actions {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .donate-btn-header {
        width: auto;
    }
    .theme-selector-btn { /* Renamed from mode-toggle-btn */
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }

    .step-card {
        max-width: 100%;
    }
    .pet-card img {
        height: 200px;
    }

    .footer-column h3 {
        font-size: 20px;
    }
    .footer-bottom p {
        font-size: 12px;
    }
}