/* --- THEME VARIABLES AND STYLES --- */
:root, [data-theme="light"] {
    --primary-color: #003C48;
    --secondary-color: #005F73;
    --accent-color: #FFB703;
    --light-bg: #f8f9fa;
    --text-dark: #212529;
    --text-light: #f8f9fa;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --subheading-color: #003C48;
    --text-color: #212529;
}

[data-theme="dark"] {
    --primary-color: #005F73;
    --secondary-color: #003C48;
    --light-bg: #1a202c;
    --card-bg: #2d3748;
    --text-color: #f7fafc;
    --border-color: #4a5568;
    --subheading-color: #efefef;
    --text-dark: #f7fafc;
}

/* --- General Styles --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.section-padding {
    padding: 100px 0;
}

.section-title {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-color);
    margin-bottom: 4rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.card, .stat-card, .submissions-table-card, .modal-content {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

.p-dark {
    color: var(--text-color);
}
.p-light {
    color: var(--text-light);
}
/* --- Navigation Bar --- */
.sticky-top {
   
    position: fixed;
    width: 100%;
}
.navbar-custom {
    /* Properties added to make the navbar sticky */
    position: fixed !important;
    top: 0;
    z-index: 1030; /* A high z-index ensures it stays on top of other page content */

    background-color: var(--card-bg);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    transition: all 0.4s ease-in-out;
}

/* New class for the scrolled state */
.navbar-custom.navbar-scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}


.navbar-custom .navbar-brand img {
    height: 40px;
}

.navbar-custom .nav-link {
    color: var(--text-color);
    font-weight: 600;
}

.navbar-custom .nav-link:hover {
    color: var(--accent-color);
}

.navbar-custom .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 50px;
    padding: 0.6rem 1.8rem;
    font-weight: 600;
}

.navbar-custom .btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* --- NEW Theme Toggle Button --- */
.theme-toggle {
    cursor: pointer;
    display: block;
}

.theme-toggle input {
    display: none;
}

.toggle-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 115px;
    height: 40px;
    background-color: #e9ecef;
    border: 2px solid #dee2e6;
    border-radius: 30px;
    padding: 4px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 30px;
    height: 30px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    z-index: 2; /* Ensures the sliding circle is on top */
}

.toggle-text-light, .toggle-text-dark {
    position: absolute; /* Stacks the text elements */
    width: 100%;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    pointer-events: none;
    transition: opacity 0.3s ease; /* Fades the text in and out */
    z-index: 1; /* Places text below the sliding circle */
}

.toggle-text-light {
    color: #333;
    opacity: 1; /* Makes "LIGHT" visible by default */
}

.toggle-text-dark {
    color: #fff;
    opacity: 0; /* Makes "DARK" hidden by default */
}

.toggle-thumb .icon-sun, .toggle-thumb .icon-moon {
    transition: opacity 0.3s ease;
}
.toggle-thumb .icon-sun {
    color: #ffb703;
    opacity: 1;
}
.toggle-thumb .icon-moon {
    color: var(--primary-color);
    opacity: 0;
    position: absolute;
}

/* Dark Mode State for Toggle */
[data-theme="dark"] .toggle-track {
    background-color: #2d3748;
    border-color: #4a5568;
}


.theme-toggle input:checked + .toggle-track .toggle-thumb {
    transform: translateX(75px);
}
/* UPDATED: Opacity control for text visibility on toggle */
.theme-toggle input:checked + .toggle-track .toggle-text-light {
    opacity: 0; /* Hides "LIGHT" text when toggled on */
}
.theme-toggle input:checked + .toggle-track .toggle-text-dark {
    opacity: 1; /* Shows "DARK" text when toggled on */
}
.theme-toggle input:checked + .toggle-track .toggle-thumb .icon-sun {
    opacity: 0;
}
.theme-toggle input:checked + .toggle-track .toggle-thumb .icon-moon {
    opacity: 1;
}

/* --- HOMEPAGE SPECIFIC STYLES --- */
.hero-section { background: var(--light-bg); }
.hero-content h1 { color: var(--primary-color); }
.service-card { border: 1px solid rgba(0, 60, 72, 0.1); }
.usp-card { background: var(--card-bg); border: 1px solid var(--border-color); }
.timeline-content { background-color: var(--card-bg); }
.footer { background-color: var(--primary-color); color: var(--text-light); }

/* --- Hero Section Carousel --- */
.hero-section {
    background: var(--light-bg);
    padding-top: 50px;
    overflow: hidden;
}

.hero-slide {
    display: flex;
    margin-top: 100px;
    align-items: center;
    padding: 0 5%;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--subheading-color);
}

.hero-content p {
    font-size: 1.1rem;
    color: #555;
    margin: 1.5rem 0 2rem;
}
[data-theme="dark"] .hero-content p {
    color: #a0aec0; /* A lighter gray for dark mode */
}


.hero-content .btn-accent {
    background-color: var(--accent-color);
    color: var(--text-dark);
    border: none;
    border-radius: 50px;
    display: inline-block;
    text-decoration: none;
    padding: 0.8rem 2.5rem;
    margin-bottom: 40px;
    font-weight: 700;
}

.hero-image-wrapper img {
    max-width: 100%;
    height: auto;
}

.hero-carousel .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
}

.hero-carousel .owl-nav button {
    background: #fff !important;
    color: var(--primary-color) !important;
    border-radius: 50% !important;
    width: 50px;
    height: 50px;
    font-size: 2rem !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hero-carousel .owl-nav .owl-prev {
    margin-left: -25px;
}

.hero-carousel .owl-nav .owl-next {
    margin-right: -25px;
}

.hero-carousel .owl-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
}
.owl-carousel .owl-dot span {
    background: #ccc !important;
}
.owl-carousel .owl-dot.active span {
    background: var(--primary-color) !important;
}

/* --- How It Works Section --- */
.how-it-works-step {
    text-align: center;
    position: relative;
}

.how-it-works-step .step-icon {
    width: 80px;
    height: 80px;
    background-color: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--light-bg);
}

.how-it-works-step h4 {
    font-weight: 600;
}

.step-arrow {
    position: absolute;
    top: 40px;
    left: 100%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: var(--accent-color);
}

/* --- USPs Section with Owl Carousel --- */
.usp-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--border-color);
    margin: 0 10px;
}

.usp-card .usp-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.usp-card h4 {
    font-weight: 600;
    color: var(--text-dark);
}

.usp-carousel .owl-dots {
    margin-top: 30px;
}

/* --- New Services Section --- */
.services-section {
    background-color: var(--card-bg);
}
[data-theme="light"] .services-section {
    background-color: #fff;
}

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

.service-card {
    background: linear-gradient(145deg, rgba(0, 95, 115, 0.05), rgba(0, 60, 72, 0.05));
    border-radius: 1rem;
    padding: 2.5rem;
    height: 320px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}
[data-theme="dark"] .service-card {
    background: var(--primary-color);
}


.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 60, 72, 0.1);
}

.service-card .service-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}
[data-theme="dark"] .service-card .service-icon {
    background-color: var(--accent-color);
    color: var(--text-dark);
}


.service-card h4 {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}
[data-theme="dark"] .service-card h4 {
    color: var(--text-light);
}

.service-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}
[data-theme="dark"] .service-card p {
    color: #a0aec0;
}


.service-card-wrapper {
    display: flex;
    justify-content: center;
}

@media (max-width: 991px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
     .service-card-wrapper:nth-child(n) {
        justify-content: center;
    }
}

/* --- About PPH Section --- */
.about-section .about-image {
    position: relative;
}
.about-section .about-image img {
    border-radius: 1rem;
}
.about-section .dots-pattern {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, var(--border-color) 2px, transparent 2px);
    background-size: 10px 10px;
    z-index: -1;
}
.about-section .dots-top-left { top: -20px; left: -20px; }
.about-section .dots-bottom-right { bottom: -20px; right: -20px; }

/* --- Advantages Section --- */
.advantages-section .advantage-image-collage {
    position: relative;
}
.advantages-section .advantage-image-collage img {
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.advantages-section .stat-bubble {
    position: absolute;
    background: #fff;
    padding: 1rem;
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    text-align: center;
}
.advantages-section .stat-bubble-1 { top: 10%; left: -10%; }
.advantages-section .stat-bubble-2 { bottom: 10%; right: -10%; }
.advantages-section .stat-bubble h4 { font-weight: 700; color: var(--primary-color); }
.advantages-section .stat-bubble p { margin: 0; color: #555; }


/* --- Process Timeline Section --- */
.process-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}
.process-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}
.timeline-container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}
.timeline-container.left {
    left: 0;
}
.timeline-container.right {
    left: 50%;
}
.timeline-container::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    right: -30px;
    background-color: white;
    border: 4px solid #FF9F55;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}
.timeline-container.right::after {
    left: -30px;
}
.timeline-content {
    padding: 20px 30px;
    background-color: var(--card-bg);
    position: relative;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}
.timeline-container.left .timeline-content {
    text-align: right;
}
.timeline-content h4 {
    font-weight: 600;
    color: #E53E3E;
}
.timeline-content p {
    color: #555;
}
[data-theme="dark"] .timeline-content p {
    color: #a0aec0;
}
.timeline-content a {
    color: #E53E3E;
    text-decoration: none;
    font-weight: 600;
}

/* Timeline Icons and Colors */
.timeline-container:nth-child(1)::after { background-color: #E53E3E; content: '\f4ca'; font-family: "Bootstrap-icons"; }
.timeline-container:nth-child(2)::after { background-color: #DD6B20; content: '\f2fa'; font-family: "Bootstrap-icons"; }
.timeline-container:nth-child(3)::after { background-color: #48BB78; content: '\f268'; font-family: "Bootstrap-icons"; }
.timeline-container:nth-child(4)::after { background-color: #38B2AC; content: '\f4d2'; font-family: "Bootstrap-icons"; }
.timeline-container:nth-child(5)::after { background-color: #E53E3E; content: '\f4d5'; font-family: "Bootstrap-icons"; }
.timeline-container:nth-child(2) h4, .timeline-container:nth-child(2) a { color: #DD6B20; }
.timeline-container:nth-child(3) h4, .timeline-container:nth-child(3) a { color: #48BB78; }
.timeline-container:nth-child(4) h4, .timeline-container:nth-child(4) a { color: #38B2AC; }

@media screen and (max-width: 768px) {
    .process-timeline::after {
        left: 31px;
    }
    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-container.left, .timeline-container.right {
        left: 0%;
    }
    .timeline-container::after {
        left: 0px;
    }
    .timeline-container.left .timeline-content, .timeline-container.right .timeline-content {
        text-align: left;
    }
    .timeline-container.right::after {
        left: 0px;
    }
}

/* --- Footer --- */
.footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding-top: 4rem;
    padding-bottom: 2rem;
}
.footer h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}
.footer a:hover {
    color: #fff;
}
.footer .social-icons a {
    font-size: 1.5rem;
    margin-right: 1rem;
}

/* --- NEW: Mobile Menu Fix --- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    .navbar-collapse .navbar-nav {
        align-items: flex-start !important;
    }
    .navbar-collapse .nav-item {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}