/*
 * City Waste Solutions (CIWASO) - Main Stylesheet
 * Waste Management Company - Lusaka, Zambia
 */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary-color: #FF6F00;
    --accent-color: #81C784;
    --text-dark: #212121;
    --text-light: #757575;
    --white: #ffffff;
    --light-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header & Navigation ===== */
header {
    background: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.logo-text span {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Navigation */
nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav ul li {
    position: relative;
}

nav a {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
    display: block;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Dropdown Menu */
nav .dropdown {
    position: relative;
}

nav .dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

nav .dropdown-toggle i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

nav .dropdown:hover .dropdown-toggle i,
nav .dropdown.active .dropdown-toggle i {
    transform: rotate(180deg);
}

nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 240px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: block;
}

nav .dropdown:hover .dropdown-menu,
nav .dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

nav .dropdown-menu li {
    border-bottom: 1px solid var(--border-color);
    display: block;
    width: 100%;
}

nav .dropdown-menu li:last-child {
    border-bottom: none;
}

nav .dropdown-menu a {
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

nav .dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

nav .dropdown-menu a::after {
    display: none;
}

/* ===== Hero Section ===== */
.hero {
    background: var(--gradient);
    color: var(--white);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero.has-bg-image {
    background-image: url('https://images.unsplash.com/photo-1532996122724-e3c354a0b15b?w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 30, 10, 0.95) 0%, rgba(0, 15, 5, 0.98) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Ensure hero container content is above overlay */
.hero > .container {
    position: relative;
    z-index: 10;
}

/* Ensure all hero content has proper z-index */
.hero .section-title,
.hero .section-title *,
.hero h1,
.hero h2,
.hero h3,
.hero p,
.hero .tagline {
    position: relative;
    z-index: 10;
}

/* Extra dark overlay for better text contrast on background images */
.hero.has-bg-image::before {
    background: rgba(0, 0, 0, 0.85);
}

/* Hero section content z-index - ensure content appears above overlay */
.hero .container,
.hero .section-title,
.hero .section-title h2,
.hero .section-title p,
.hero h1,
.hero h2,
.hero p {
    position: relative;
    z-index: 10;
}

/* Hero section text - better contrast with strong shadows */
.hero h1,
.hero h2,
.hero .section-title h2 {
    color: #ffffff !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 0, 0, 0.7);
}

.hero .section-title p,
.hero .tagline,
.hero p {
    color: #ffffff !important;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 1), 0 0 15px rgba(0, 0, 0, 0.8);
}

/* Hero buttons with better contrast */
.hero .btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.hero .btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* Special handling for inline-styled hero text */
.hero [style*="color: white"],
.hero [style*="color: rgba(255,255,255)"] {
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 1) !important;
}

.hero [style*="color: rgba(255,255,255,0.9)"] {
    color: #ffffff !important;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 1) !important;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content .tagline {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #ffffff;
    font-weight: 500;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #f0f0f0;
    line-height: 1.7;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #E65100;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-color);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ===== Stats Section ===== */
.stats {
    background: var(--primary-dark);
    color: var(--white);
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.stat-item p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ===== Sections ===== */
section {
    padding: 5rem 0;
}

section.light-bg {
    background: var(--light-bg);
}

/* ===== Cards ===== */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 20px var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ===== Services Grid ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    text-align: center;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
}

/* ===== About Section ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image img {
    border-radius: 12px;
}

.about-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* ===== Values Section ===== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.value-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 3px 15px var(--shadow);
}

.value-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.value-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ===== Testimonials ===== */
.testimonials {
    background: var(--gradient);
    color: var(--white);
}

.testimonials .section-title h2,
.testimonials .section-title p {
    color: var(--white);
}

.testimonials .section-title p {
    opacity: 0.9;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    color: var(--white);
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: 600;
}

.testimonial-info h5 {
    color: var(--white);
    margin-bottom: 0.25rem;
}

.testimonial-info span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== CTA Section ===== */
.cta-section {
    background: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 4rem 0;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-section p {
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ===== Contact Section ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-info-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.contact-info-content p {
    color: var(--text-light);
}

/* ===== Contact Form ===== */
.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ===== Service Detail Page ===== */
.service-detail {
    padding: 5rem 0;
}

.service-detail-header {
    text-align: center;
    margin-bottom: 3rem;
}

.service-detail-header .service-icon-large {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
}

.service-detail-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.service-detail-main h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-detail-main p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.service-detail-main ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-detail-main ul li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.service-sidebar .card {
    margin-bottom: 1.5rem;
}

.service-sidebar h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-sidebar ul {
    list-style: none;
}

.service-sidebar ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.service-sidebar ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-sidebar ul li a:hover {
    color: var(--primary-color);
}

/* ===== Footer ===== */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.footer-links h4,
.footer-contact h4,
.footer-newsletter h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-contact-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-contact-item span {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    border: none;
    border-radius: 5px;
    color: var(--white);
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    background: var(--light-bg);
    padding: 1.5rem 0;
}

.breadcrumbs-list {
    display: flex;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.breadcrumbs-list a {
    color: var(--text-light);
}

.breadcrumbs-list a:hover {
    color: var(--primary-color);
}

.breadcrumbs-list span {
    color: var(--text-light);
}

.breadcrumbs-list .current {
    color: var(--primary-color);
    font-weight: 500;
}

/* ===== Responsive Images ===== */
.responsive-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.hero-img,
.service-img,
.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.service-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16/9;
}

.service-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image-wrapper img {
    transform: scale(1.05);
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero.has-bg-image .hero-image {
        display: none;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-grid,
    .contact-grid,
    .service-detail-content {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero.has-bg-image {
        background-attachment: scroll;
    }

    .menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem;
        box-shadow: 0 5px 10px var(--shadow);
        gap: 0;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        border-bottom: 1px solid var(--border-color);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav a {
        display: block;
        padding: 0.75rem 1rem;
    }

    /* Mobile dropdown */
    nav .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        padding-left: 1.5rem;
        background: var(--light-bg);
        min-width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    nav .dropdown.active .dropdown-menu {
        display: block;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .service-card,
    .testimonial-card,
    .card {
        padding: 1.5rem;
    }
}

/* ===== Animation Classes ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.pt-1 { padding-top: 1rem; }
.pt-2 { padding-top: 2rem; }
.pt-3 { padding-top: 3rem; }
.pb-1 { padding-bottom: 1rem; }
.pb-2 { padding-bottom: 2rem; }
.pb-3 { padding-bottom: 3rem; }
