/* Global Variables */
:root {
    /* Colors */
    --color-primary: #4CAF50;
    --color-primary-dark: #2E7D32;
    --color-secondary: #FFEB3B;
    --color-accent: #2196F3;
    --color-bg: #F1F8E9;
    /* Very light green tint for freshness */
    --color-white: #FFFFFF;
    --color-text: #37474F;
    --color-text-light: #607D8B;

    /* Shadows & Glass */
    --shadow-card: 0 10px 20px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --backdrop-blur: blur(10px);

    /* Spacing */
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --container-width: 1200px;

    /* Font */
    --font-family: 'Outfit', sans-serif;
    --radius-lg: 16px;
    --radius-md: 12px;
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    color: var(--color-primary-dark);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

p {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--color-white);
}

.bg-accent {
    background-color: #E3F2FD;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    /* Slightly more opaque for fixed */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease-in-out;
}

.navbar.scroll-down {
    transform: translateY(-100%);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--color-text);
    border-radius: 3px;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 80vh;
    width: 100%;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.hero-content {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(5px);
    padding: 40px 60px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    transform: translateY(20px);
    animation: slideUp 0.8s forwards 0.5s;
    opacity: 0;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Problem Section */
.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 1.25rem;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.problem-card {
    text-align: center;
    background: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s;
}

.problem-card:hover {
    transform: translateY(-5px);
}

.problem-card .icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

/* Bag Types Grid */
.bag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.bag-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.bag-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.bag-card img,
.placeholder-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-body {
    padding: var(--spacing-md);
}

.card-body h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
}

.card-body p {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: var(--color-text-light);
}

.card-body strong {
    color: var(--color-text);
}

/* Calculator */
.calculator-box {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    padding: 40px;
    border-radius: var(--radius-lg);
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-card);
}

select {
    padding: 15px;
    width: 100%;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
    border: 2px solid #ddd;
    margin-bottom: 20px;
    font-family: inherit;
    cursor: pointer;
}

#impact-result {
    margin-top: 20px;
}

.big-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

/* DIY Section */
.diy-grid {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.diy-card {
    background: var(--color-secondary);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    color: #5D4037;
}

.diy-card .icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Table */
.bag-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    border-radius: var(--radius-lg);
    min-width: 600px;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.bag-table th,
.bag-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.bag-table th {
    background: var(--color-primary);
    color: white;
}

/* Form */
#survey-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.radio-group {
    display: flex;
    gap: 20px;
    margin: 10px 0 30px;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
    font-weight: 700;
}

.btn-primary:hover {
    transform: scale(1.02);
    background: var(--color-primary-dark);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px;
    background: var(--color-primary-dark);
    color: white;
    font-size: 1.2rem;
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .navbar {
        padding: 1rem;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        /* Adjust based on navbar height */
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        gap: 0;
        padding-top: 2rem;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 20px 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hero-content {
        margin: 0 20px;
        padding: 30px 20px;
    }

    .diy-grid {
        flex-direction: column;
        align-items: center;
    }

    .bag-grid,
    .problem-grid {
        grid-template-columns: 1fr;
        /* Force single column on smaller screens if needed */
        padding: 0 10px;
    }

    .container {
        padding: 0 15px;
    }
}

/* =========================================
   PLASTIC PAGE STYLES
   ========================================= */

/* Hero Specifics */
.plastic-hero {
    height: 90vh;
    /* Taller hero */
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fdfbf7 0%, #e6f7ec 100%);
    position: relative;
    overflow: hidden;
}

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-text {
    flex: 1;
    padding-right: 50px;
    z-index: 2;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    color: #2c3e50;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: #556b2f;
    /* Olive green */
    font-weight: 300;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    /* Drop shadow for depth */
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
    animation: floatEarth 6s ease-in-out infinite;
}

@keyframes floatEarth {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Timeline / How Plastic Entered */
.timeline-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.timeline-content p {
    font-size: 1.3rem;
    color: #555;
}

.highlight-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #c0392b;
    /* Alert color */
    margin: 30px 0;
    padding: 20px;
    background: #fff0f0;
    border-left: 5px solid #c0392b;
    border-radius: 8px;
}

.icons-row {
    font-size: 3rem;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    opacity: 0.8;
}

/* Two Col Layout */
.content-grid {
    display: grid;
    gap: 50px;
    align-items: center;
}

.two-col {
    grid-template-columns: 1fr 1fr;
}

.text-block p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.quote-block blockquote {
    font-size: 2rem;
    font-weight: 700;
    color: #27ae60;
    border-left: 5px solid #27ae60;
    padding-left: 30px;
    font-style: italic;
}

/* Hidden Plastic */
.image-block {
    text-align: center;
}

.image-block img {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.caption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
}

/* Single Use Grid */
.single-use-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.single-use-grid .item {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    width: 150px;
    transition: transform 0.3s;
}

.single-use-grid .item:hover {
    transform: translateY(-5px);
}

.x-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.max-w-700 {
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Impact Section */
.impact-bg {
    background: #2c3e50;
    /* Dark Blue Grey */
    color: white;
}

.impact-bg h2 {
    color: #ecf0f1;
}

.impact-bg p {
    color: #bdc3c7;
    font-size: 1.3rem;
}

.big-quote {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 50px;
    color: #f1c40f;
    /* Yellow accent */
}

/* Reflection / Action */
.action-area {
    margin-top: 40px;
}

/* Info Box */
.info-box {
    background: #e1f5fe;
    border: 1px solid #b3e5fc;
    color: #01579b;
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 20px;
}

/* Scroll Animations */
/* Scroll Animations (Robust Fix) */
.scroll-animate {
    /* Default: Visible (if JS fails/loads late) */
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* Only hide if JS has successfully initiated */
body.js-active .scroll-animate {
    opacity: 0;
    transform: translateY(50px);
}

body.js-active .scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   NEW INTERACTIVE ELEMENTS
   ========================================= */

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, #4CAF50, #81C784);
    width: 0%;
    z-index: 2000;
    transition: width 0.1s;
}

/* Ambient Particles Background */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -20px;
    background: rgba(76, 175, 80, 0.15);
    border-radius: 50%;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    20% {
        opacity: 0.5;
    }

    80% {
        opacity: 0.2;
    }

    100% {
        transform: translateY(-110vh) scale(1.2);
        opacity: 0;
    }
}

/* Enhanced Glassmorphism Cards */
.plastic-card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.05);
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.plastic-card-glass:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(31, 38, 135, 0.1);
    background: rgba(255, 255, 255, 0.85);
}

/* Visual Timeline Steps */
.timeline-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 150px;
}

.timeline-icon {
    font-size: 3rem;
    background: white;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 15px;
    z-index: 2;
    border: 3px solid #e8f5e9;
}

.timeline-step p {
    font-weight: 600;
    color: #37474F;
    font-size: 1rem;
}

.step-arrow {
    font-size: 2rem;
    color: #4CAF50;
    margin-bottom: 30px;
    /* Align with icon center generally */
}

/* Responsive adjustments for Plastic page */
@media (max-width: 900px) {

    .hero-layout,
    .two-col {
        flex-direction: column;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-image img {
        max-width: 80%;
    }

    .quote-block blockquote {
        font-size: 1.5rem;
        border-left: none;
        border-top: 5px solid #27ae60;
        padding-top: 20px;
        padding-left: 0;
    }
}

/* =========================================
   BIODEGRADABLE PAGE STYLES
   ========================================= */

/* Hero Reverse Layout */
.bio-hero {
    height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%);
    /* Fresh green tint */
    position: relative;
    overflow: hidden;
}

.reverse-hero {
    flex-direction: row-reverse;
}

.reverse-hero .hero-text {
    padding-left: 50px;
    padding-right: 0;
}

/* Lifecycle */
.lifecycle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.lifecycle-container img {
    max-width: 400px;
    width: 100%;
}

.lifecycle-text {
    max-width: 400px;
    text-align: left;
    font-size: 1.2rem;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Flip Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 350px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
    /* Support for JS toggle class 'flipped' */
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.flip-card-front {
    background-color: #fff;
    color: black;
    background-size: cover;
    background-position: center;
}

.flip-card-front h3 {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 50px;
    margin: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.flip-card-back {
    background: linear-gradient(135deg, #4CAF50, #81C784);
    color: white;
    transform: rotateY(180deg);
}

.flip-card-back h3 {
    color: white;
    margin-bottom: 20px;
}

.flip-card-back p {
    color: white;
    margin: 5px 0;
    font-size: 1.1rem;
}

/* Chart Container */
.chart-container {
    max-width: 800px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.chart-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.chart-row .label {
    width: 100px;
    font-weight: 600;
}

.chart-row .bar {
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding-left: 20px;
    color: white;
    font-weight: 700;
    transition: width 1s ease-out;
}

.plastic-bar {
    background: #B0BEC5;
    color: #555;
}

.corn-bar {
    background: #AED581;
}

.cotton-bar {
    background: #4DB6AC;
}

.jute-bar {
    background: #4CAF50;
}

/* Counter Box */
.counter-box {
    background: white;
    padding: 50px;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 20px 40px rgba(76, 175, 80, 0.15);
    border: 2px solid #E8F5E9;
}

.counter-display {
    font-size: 5rem;
    font-weight: 800;
    color: #4CAF50;
    margin: 20px 0;
    line-height: 1;
}

/* DIY List */
.diy-list {
    list-style: none;
    margin-top: 20px;
}

.diy-list li {
    font-size: 1.2rem;
    margin-bottom: 20px;
    background: #FFF3E0;
    padding: 15px 25px;
    border-radius: 50px;
    display: inline-block;
}

/* Responsive adjustments for Biodegradable page */
@media (max-width: 900px) {
    .lifecycle-container {
        flex-direction: column;
    }

    .reverse-hero {
        flex-direction: column;
    }

    .reverse-hero .hero-text {
        padding-left: 0;
    }
}