/* ===== ROOT ===== */
:root {
    --primary: #1a5e2a;
    --primary-light: #2e7d32;
    --primary-dark: #0d3b1a;
    --secondary: #4caf50;
    --accent: #8bc34a;
    --light-bg: #f0f7f0;
    --white: #ffffff;
    --dark: #1e2a1e;
    --text-muted: #5a6b5a;
    --shadow: 0 8px 32px rgba(26, 94, 42, 0.15);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
    padding-top: 76px;
}

.row {
    --bs-gutter-x: 1.5rem;
    /* --bs-gutter-y: 0; */
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--bs-gutter-y));
    margin-right: calc(-.5 * var(--bs-gutter-x));
    margin-left: initial;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--light-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== BUTTONS ===== */
.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(26, 94, 42, 0.3);
}
.btn-primary-custom:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(26, 94, 42, 0.4);
}
.btn-outline-custom {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}
.btn-outline-custom:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(26, 94, 42, 0.3);
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.08);
    /* padding: 12px 0; */
    transition: var(--transition);
}
.navbar.scrolled {
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.98);
}
.navbar-brand img {
    /* height: 48px; */
    transition: var(--transition);
}
.navbar-brand span {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}
.navbar-brand span small {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.7rem;
    display: block;
    letter-spacing: 0.5px;
}
.nav-link {
    font-weight: 600;
    color: var(--dark) !important;
    margin: 0 6px;
    padding: 8px 16px !important;
    border-radius: 30px;
    transition: var(--transition);
    position: relative;
    font-size: 0.95rem;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
    transition: var(--transition);
    transform: translateX(-50%);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}
.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
    background: rgba(26, 94, 42, 0.06);
}
.navbar-toggler {
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(26, 94, 42, 0.2);
}

@media (max-width: 400px) {
    .navbar .container {
        padding-left: 6px;
        padding-right: 6px;
    }
}

/* ===== HERO SLIDER ===== */
.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 75vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 40%, #a5d6a7 100%);
}
.hero-slider .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 1;
}
.hero-slider .slide-content {
    position: relative;
    z-index: 2;
    padding: 60px 0;
}
.hero-slider .badge-cert {
    display: inline-block;
    background: rgba(26, 94, 42, 0.12);
    backdrop-filter: blur(4px);
    padding: 8px 24px;
    border-radius: 50px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border: 1px solid rgba(26, 94, 42, 0.15);
    margin-bottom: 20px;
}
.hero-slider h1 {
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 900;
    line-height: 1.05;
    color: var(--dark);
}
.hero-slider h1 .highlight {
    color: var(--primary);
    position: relative;
}
.hero-slider h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(76, 175, 80, 0.25);
    border-radius: 10px;
    z-index: -1;
}
.hero-slider p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 540px;
    line-height: 1.8;
}
.hero-slider .floating-icon {
    animation: floatY 6s ease-in-out infinite;
}

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

/* hero slider carousel indicators */
.hero-slider .carousel-indicators button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: transparent;
    opacity: 0.5;
    transition: var(--transition);
    margin: 0 6px;
}
.hero-slider .carousel-indicators button.active {
    background: var(--primary);
    opacity: 1;
    transform: scale(1.2);
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--dark);
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 10px;
}
.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}
.section-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 16px auto 0;
}

/* ===== ABOUT ===== */
#about {
    padding: 100px 0;
    background: var(--white);
}
#about .about-img-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
#about .about-img-wrapper img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: var(--transition);
}
#about .about-img-wrapper:hover img {
    transform: scale(1.03);
}
#about .about-img-wrapper .floating-badge {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    text-align: center;
}
#about .about-img-wrapper .floating-badge h3 {
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    font-size: 1.8rem;
}
#about .about-img-wrapper .floating-badge p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

#about .about-text h2 {
    font-weight: 800;
    font-size: 2.2rem;
}
#about .about-text .feature-list li {
    list-style: none;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}
#about .about-text .feature-list li i {
    color: var(--primary);
    font-size: 1.3rem;
    width: 28px;
}

/* ===== SERVICES ===== */
#services {
    padding: 100px 0;
    background: var(--light-bg);
}
.service-card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}
.service-card:hover::before {
    transform: scaleX(1);
}
.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 16px 48px rgba(26, 94, 42, 0.12);
}
.service-card .icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(26, 94, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.4rem;
    color: var(--primary);
    transition: var(--transition);
}
.service-card:hover .icon-wrapper {
    background: var(--primary);
    color: #fff;
    transform: scale(1.05);
}
.service-card h5 {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 12px;
}
.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}
.service-card .grade-badge {
    display: inline-block;
    background: rgba(26, 94, 42, 0.08);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    margin-top: 8px;
}

/* ===== CERTIFICATE GRADE ===== */
.grade-section {
    background: var(--white);
    padding: 60px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.grade-item {
    text-align: center;
    padding: 20px;
    border-radius: 16px;
    transition: var(--transition);
}
.grade-item:hover {
    background: rgba(26, 94, 42, 0.04);
}
.grade-item .grade-letter {
    font-size: 3.2rem;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.2;
    transition: var(--transition);
}
.grade-item:hover .grade-letter {
    opacity: 0.6;
    transform: scale(1.1);
}
.grade-item .grade-label {
    font-weight: 600;
    color: var(--dark);
    margin-top: 4px;
}

/* ===== CONTACT ===== */
#contact {
    padding: 100px 0;
    background: var(--white);
}
#contact .contact-info-card {
    background: var(--light-bg);
    padding: 32px 28px;
    border-radius: 20px;
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
}
#contact .contact-info-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}
#contact .contact-info-card i {
    font-size: 1.4rem;
    color: var(--primary) !important;
    margin-bottom: 0px;
}
#contact .contact-info-card h6 {
    font-weight: 700;
}
#contact .contact-info-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

#contact .form-control {
    padding: 14px 20px;
    border-radius: 14px;
    border: 2px solid #e8f0e8;
    background: var(--light-bg);
    font-size: 0.95rem;
    transition: var(--transition);
}
#contact .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 94, 42, 0.1);
    background: var(--white);
}
#contact .form-control::placeholder {
    color: #a0b0a0;
}
#contact textarea.form-control {
    resize: vertical;
    min-height: 130px;
}
#contact .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

/* ===== FOOTER ===== */
footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 0;
}
footer .footer-brand {
    font-weight: 800;
    font-size: 1.6rem;
    color: #fff;
}
footer .footer-brand img{
    background: #f0f7f0;
    border-radius: 5px;
}
footer .footer-brand small {
    font-weight: 400;
    font-size: 0.7rem;
    display: block;
    color: rgba(255, 255, 255, 0.5);
}
footer p {
    font-size: 0.95rem;
    line-height: 1.8;
}
footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 1.2rem;
    transition: var(--transition);
    margin-right: 10px;
    text-decoration: none;
}
footer .social-links a:hover {
    background: var(--primary);
    transform: translateY(-4px);
    color: #fff;
}
footer .footer-links {
    list-style: none;
    padding: 0;
}
footer .footer-links li {
    margin-bottom: 10px;
}
footer .footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}
footer .footer-links a:hover {
    color: #fff;
    padding-left: 6px;
}
footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.pulse-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--secondary);
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 16px 0;
    }
    .nav-link::after {
        display: none;
    }
    .hero-slider {
        min-height: 70vh;
    }
    .hero-slider h1 {
        font-size: 2.6rem;
    }
    #about .about-img-wrapper img {
        height: 300px;
    }
}

@media (max-width: 575.98px) {
    body {
        padding-top: 64px;
    }
    .navbar-brand img {
        height: 36px;
    }
    .navbar-brand span {
        font-size: 1rem;
    }
    .hero-slider {
        min-height: 60vh;
        text-align: center;
    }
    .hero-slider h1 {
        font-size: 2rem;
    }
    .hero-slider p {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-slider .btn-group {
        flex-direction: column;
        gap: 12px;
    }
    .hero-slider .btn-group .btn {
        width: 100%;
    }
    .section-title {
        font-size: 1.8rem;
    }
    #about .about-img-wrapper img {
        height: 220px;
    }
    .service-card {
        padding: 28px 20px;
    }
    .grade-item .grade-letter {
        font-size: 2.4rem;
    }
    #contact .contact-info-card {
        padding: 24px 18px;
    }
    footer {
        padding: 40px 0 0;
    }
    footer .footer-brand {
        font-size: 1.3rem;
    }
}

/* extra small */
@media (max-width: 400px) {
    .hero-slider h1 {
        font-size: 1.6rem;
    }
    .hero-slider .badge-cert {
        font-size: 0.7rem;
        padding: 6px 16px;
    }
}


/* =========================================================
   FINAL RESPONSIVE / HORIZONTAL SCROLL FIX
   ========================================================= */

/* Prevent viewport-wide overflow */
html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

/* Never allow media/content to become wider than its parent */
img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

/* Bootstrap rows can create horizontal overflow because of
   negative margins. Keep the page rows inside the viewport. */
.row {
    max-width: 100%;
}

/* Keep Bootstrap containers inside viewport */
.container,
.container-fluid {
    width: 100%;
    max-width: 80%;
}

/* ================= HERO ================= */

.hero-slider {
    width: 100%;
    max-width: 100%;
    overflow: hidden !important;
}

.hero-slider .container {
    width: 100%;
    max-width: 80%;
}

.hero-slider .slide-content {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.hero-slider .col-lg-6 {
    min-width: 0;
}

.hero-slider h1,
.hero-slider p {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.hero-slider img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100% !important;
}

.hero-slider .floating-icon {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.hero-slider .floating-icon img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Buttons must stay inside the screen */
.hero-slider .btn-group {
    max-width: 100%;
}

.hero-slider .btn {
    max-width: 100%;
    white-space: normal;
}

/* Carousel arrows */
.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    max-width: 40px;
}

/* hero slider carousel indicators */
.hero-slider .carousel-indicators button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: transparent;
    opacity: 0.5;
    transition: var(--transition);
    margin: 0 6px;
}
.hero-slider .carousel-indicators button.active {
    background: var(--primary);
    opacity: 1;
    transform: scale(1.2);
}

/* ================= ABOUT / SERVICES ================= */

.about-img-wrapper,
.about-img-wrapper img,
.service-card {
    width: 100%;
    max-width: 100%;
}

.service-card {
    box-sizing: border-box;
}

/* ================= CONTACT ================= */

#contact .row,
#contact .col-lg-4,
#contact .col-lg-8,
#contact .contact-info-card,
#contact form,
#contact .form-control {
    max-width: 100%;
}

#contact .form-control {
    width: 100%;
    box-sizing: border-box;
}

/* ================= FOOTER ================= */

footer {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

footer .container,
footer .footer-links {
    max-width: 80%;
}

footer .footer-links li,
footer p,
footer a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ================= MOBILE ================= */

@media (max-width: 575.98px) {

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Stack hero columns cleanly */
    .hero-slider .row {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-slider .col-lg-6 {
        width: 100%;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero-slider .slide-content {
        padding: 40px 0;
    }

    .hero-slider h1 {
        font-size: clamp(1.7rem, 8vw, 2.2rem);
        line-height: 1.15;
    }

    .hero-slider p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Prevent animation from pushing the image outside viewport */
    .hero-slider .floating-icon {
        animation: none !important;
        transform: none !important;
    }

    /* Full-width mobile buttons */
    .hero-slider .btn-group {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px !important;
    }

    .hero-slider .btn-group .btn {
        width: 100%;
        max-width: 100%;
    }

    /* Grade cards: keep four items but make text fit */
    .grade-section .row {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .grade-section .col-3,
    .grade-section .col-sm-3 {
        width: 25%;
        max-width: 25%;
        padding-left: 4px;
        padding-right: 4px;
    }

    .grade-item {
        width: 100%;
        max-width: 100%;
        padding-left: 2px;
        padding-right: 2px;
        box-sizing: border-box;
    }

    .grade-item .grade-label {
        font-size: 0.6rem;
        line-height: 1.2;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .grade-item .grade-letter {
        font-size: 1.8rem;
    }

    /* Navbar */
    .navbar-brand {
        min-width: 0;
        max-width: calc(100% - 55px);
    }

    .navbar-brand img {
        max-height: 36px;
        width: auto;
        max-width: 100%;
    }

    .navbar-brand span {
        font-size: 0.95rem;
        white-space: normal;
    }

    /* Contact */
    #contact .contact-info-card {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    /* Footer */
    footer .footer-links {
        width: 100%;
        max-width: 100%;
    }
}

/* Extra-small screens */
@media (max-width: 400px) {

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .hero-slider .slide-content {
        padding-left: 0;
        padding-right: 0;
    }

    .hero-slider h1 {
        font-size: 1.6rem;
    }

    .hero-slider .badge-cert {
        max-width: 100%;
        font-size: 0.7rem;
        padding: 6px 12px;
        white-space: normal;
    }

    .grade-item .grade-label {
        font-size: 0.55rem;
    }

    .grade-item .grade-letter {
        font-size: 1.6rem;
    }
}

/* Remove any default margins/padding from the section */
.hero-slider {
    width: 100vw; /* Use viewport width to force edge-to-edge */
    height: 650px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* Ensure the carousel and inner containers span the full width and height */
.hero-slider .carousel,
.hero-slider .carousel-inner,
.hero-slider .carousel-item {
    width: 100%;
    height: 100%;
}

/* Make sure images cover the entire area without stretching */
.hero-slider .slider-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Optional: Fix indicators position if needed */
.hero-slider .carousel-indicators {
    bottom: 20px;
    z-index: 10;
}
