/* =========================================================
   SP Enterprises - FULL REPLACEABLE CSS (FAINT THEME)
   - Logo colors: Blue + Green + Orange
   - Gradient pill buttons
   - Fixed dropdown click + z-index
   - Fixed gallery styles (not inside media query)
========================================================= */

:root {
    --sp-blue: #1f66d1;
    --sp-green: #2e7d32;
    --sp-orange: #f59e0b;
    --pill-grad: linear-gradient(90deg,#1f66d1 0%,#2e7d32 100%);
    --bg: #f3f8f6;
    --bg2: #eef4ff;
    --text: #0f172a;
    --muted: #475569;
    --card: rgba(255,255,255,.86);
    --card2: rgba(255,255,255,.74);
    --border: rgba(15,23,42,.10);
    --border-green: rgba(46,125,50,.16);
    --shadow: 0 18px 40px rgba(15,23,42,.08);
    --shadow2: 0 24px 60px rgba(15,23,42,.12);
    --radius: 18px;
}

/* Base */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    background: radial-gradient(900px 500px at 12% 12%, rgba(46,125,50,.12), transparent 60%), radial-gradient(900px 500px at 88% 0%, rgba(31,102,209,.12), transparent 55%), radial-gradient(700px 400px at 70% 90%, rgba(245,158,11,.10), transparent 55%), linear-gradient(180deg,var(--bg),var(--bg2));
}

a {
    color: inherit;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

.container {
    width: min(1200px,92%);
    margin: 0 auto;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Animation */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(14px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: fadeUp .7s ease both;
}

/* =========================================================
   Topbar
========================================================= */
.topbar {
    background: rgba(255,255,255,.55);
    border-bottom: 1px solid var(--border-green);
    backdrop-filter: blur(10px);
    position: relative;
}

    .topbar::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 3px;
        background: var(--pill-grad);
        opacity: .9;
    }

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    gap: 14px;
    flex-wrap: wrap;
}

.topbar-left {
    color: rgba(15,23,42,.78);
    font-weight: 900;
}

.topbar-right {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar a {
    color: rgba(15,23,42,.74);
    font-weight: 900;
}

    .topbar a:hover {
        color: var(--sp-blue);
        text-decoration: none;
    }

.topbar-whatsapp {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(46,125,50,.26);
    background: rgba(46,125,50,.10);
    color: var(--sp-green) !important;
    font-weight: 900;
}

    .topbar-whatsapp:hover {
        background: rgba(46,125,50,.14);
        text-decoration: none;
    }

/* =========================================================
   Header + Menu
========================================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255,255,255,.75);
    border-bottom: 1px solid var(--border-green);
    backdrop-filter: blur(12px);
}

    .header::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 3px;
        background: var(--pill-grad);
        opacity: .9;
    }

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .brand img {
        height: 100px;
        width: auto;
        display: block;
        background: transparent !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

/* Nav */
.nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Desktop links */
.desktop-nav a {
    color: rgba(15,23,42,.88);
    font-weight: 900;
    padding: 10px 14px;
    border-radius: 999px;
    position: relative;
    transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
    text-decoration: none !important;
}

    .desktop-nav a::after {
        content: "";
        position: absolute;
        left: 14px;
        right: 14px;
        bottom: 6px;
        height: 3px;
        border-radius: 99px;
        background: var(--pill-grad);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .22s ease;
        opacity: .95;
    }

    .desktop-nav a:hover {
        color: var(--sp-blue);
        background: rgba(31,102,209,.06);
        box-shadow: 0 10px 22px rgba(15,23,42,.08);
        transform: translateY(-1px);
        text-decoration: none !important;
    }

        .desktop-nav a:hover::after {
            transform: scaleX(1);
        }

    .desktop-nav a.active {
        color: var(--sp-green);
        background: rgba(46,125,50,.08);
        border: 1px solid rgba(46,125,50,.18);
        box-shadow: 0 10px 22px rgba(15,23,42,.08);
    }

        .desktop-nav a.active::after {
            transform: scaleX(1);
        }

/* =========================================================
   Dropdown (FIXED)
========================================================= */
.dropdown {
    position: relative;
}

/* Button like menu item */
.dropbtn {
    border: 0;
    background: transparent;
    color: rgba(15,23,42,.88);
    font-weight: 900;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}

    .dropbtn:hover {
        color: var(--sp-blue);
        background: rgba(31,102,209,.06);
        box-shadow: 0 10px 22px rgba(15,23,42,.08);
        transform: translateY(-1px);
    }

.caret {
    opacity: .75;
    margin-left: 6px;
}

/* Dropdown panel */
.dropdown-content {
    display: none;
    position: absolute;
    top: 54px;
    left: 0;
    min-width: 220px;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(46,125,50,.18);
    border-radius: 18px;
    box-shadow: var(--shadow2);
    overflow: hidden;
    padding: 8px;
    z-index: 99999; /* ? high */
    pointer-events: auto; /* ? clickable */
}

    .dropdown-content a {
        display: block;
        padding: 12px 14px;
        border-radius: 14px;
        font-weight: 900;
        color: rgba(15,23,42,.92);
        transition: background .18s ease, transform .12s ease, color .18s ease;
        text-decoration: none !important;
    }

        .dropdown-content a:hover {
            background: rgba(46,125,50,.10);
            color: var(--sp-green);
            transform: translateX(2px);
        }

/* Hover open */
.dropdown:hover .dropdown-content {
    display: block;
}
/* Click open (JS adds .open) */
.dropdown.open .dropdown-content {
    display: block;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* =========================================================
   Buttons
========================================================= */
.btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 900;
    border: 1px solid transparent;
    text-decoration: none !important;
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

    .btn:hover {
        transform: translateY(-1px);
    }

.btn-primary {
    background: var(--pill-grad);
    border: 0;
    color: #fff;
    border-radius: 16px;
    padding: 14px 22px;
    box-shadow: 0 18px 35px rgba(31,102,209,.18), 0 10px 22px rgba(46,125,50,.12);
}

    .btn-primary:hover {
        filter: brightness(1.03);
        box-shadow: 0 22px 45px rgba(31,102,209,.22), 0 14px 30px rgba(46,125,50,.18);
    }

.btn-outline {
    border: 1px solid rgba(46,125,50,.28);
    background: rgba(255,255,255,.55);
    color: rgba(15,23,42,.88);
}

    .btn-outline:hover {
        background: rgba(46,125,50,.08);
        border-color: rgba(46,125,50,.30);
        color: var(--sp-green);
    }

.w-100 {
    width: 100%;
}

/* =========================================================
   Mobile Menu
========================================================= */
.mobile-toggle {
    display: none;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.7);
    border-radius: 14px;
    padding: 10px 12px;
    cursor: pointer;
}

    .mobile-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: rgba(15,23,42,.85);
        margin: 4px 0;
    }

.mobile-menu {
    position: fixed;
    top: 0;
    right: -330px;
    width: 330px;
    height: 100vh;
    background: rgba(255,255,255,.95);
    color: var(--text);
    z-index: 9999;
    transition: right .25s ease;
    overflow: auto;
    border-left: 1px solid rgba(46,125,50,.18);
    backdrop-filter: blur(12px);
}

    .mobile-menu.show {
        right: 0;
    }

.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.30);
    opacity: 0;
    visibility: hidden;
    transition: .25s;
    z-index: 9998;
}

    .backdrop.show {
        opacity: 1;
        visibility: visible;
    }

.mobile-menu-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(46,125,50,.18);
    position: relative;
}

    .mobile-menu-head::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 3px;
        background: var(--pill-grad);
    }

.mobile-menu-title {
    font-weight: 900;
}

.mobile-close {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
}

.mobile-menu-links {
    padding: 10px 18px;
}

    .mobile-menu-links a {
        display: block;
        padding: 14px 10px;
        border-radius: 14px;
        font-weight: 900;
        color: rgba(15,23,42,.92);
        transition: background .18s ease, color .18s ease;
        text-decoration: none !important;
    }

        .mobile-menu-links a:hover {
            background: rgba(31,102,209,.06);
            color: var(--sp-blue);
            text-decoration: none !important;
        }

.mobile-cta {
    padding: 16px 0;
}

/* =========================================================
   Sections + Hero
========================================================= */
.section {
    padding: 66px 0;
}

.hero {
    padding: 76px 0 62px;
    border-bottom: 1px solid rgba(46,125,50,.16);
    background: linear-gradient(180deg, rgba(46,125,50,.06), transparent);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 30px;
    align-items: center;
    animation: fadeUp .7s ease both;
}

.hero h1 {
    font-size: clamp(32px,3.9vw,54px);
    margin: 0 0 12px 0;
    line-height: 1.12;
}

.hero p {
    margin: 0 0 18px 0;
    color: rgba(71,85,105,.95);
    font-size: 18px;
}

/* Badges */
.badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.badge {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid rgba(15,23,42,.12);
    background: rgba(255,255,255,.70);
}

    .badge.green {
        border-color: rgba(46,125,50,.25);
        background: rgba(46,125,50,.10);
        color: var(--sp-green);
    }

    .badge.blue {
        border-color: rgba(31,102,209,.25);
        background: rgba(31,102,209,.10);
        color: var(--sp-blue);
    }

    .badge.orange {
        border-color: rgba(245,158,11,.28);
        background: rgba(245,158,11,.12);
        color: #b45309;
    }

/* =========================================================
   Cards + Grids
========================================================= */
.card {
    border: 1px solid rgba(46,125,50,.12);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--card), var(--card2));
    box-shadow: var(--shadow);
    padding: 22px;
    transition: transform .18s ease, box-shadow .18s ease;
}

    .card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow2);
    }

    .card h3 {
        margin: 0 0 8px 0;
    }

.small {
    font-size: 13px;
    color: rgba(71,85,105,.95);
}

.grid3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;
}

.grid2 {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 18px;
}

/* =========================================================
   CTA strip
========================================================= */
.cta {
    background: rgba(255,255,255,.65);
    border: 1px solid rgba(46,125,50,.16);
    border-radius: 22px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

    .cta::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 4px;
        background: var(--pill-grad);
        opacity: .9;
    }

    .cta .muted {
        color: rgba(71,85,105,.95);
    }

/* =========================================================
   Footer
========================================================= */
.footer {
    margin-top: 64px;
    background: rgba(255,255,255,.55);
    border-top: 1px solid rgba(46,125,50,.16);
    backdrop-filter: blur(12px);
    position: relative;
}

    .footer::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 4px;
        background: var(--pill-grad);
        opacity: .9;
    }

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
    padding: 46px 0;
}

.footer h4, .footer h5 {
    margin: 0 0 10px 0;
    color: var(--text);
}

.footer p {
    margin: 0 0 12px 0;
    color: rgba(71,85,105,.95);
}

.footer li {
    padding: 6px 0;
    color: rgba(71,85,105,.95);
}

    .footer li a {
        color: rgba(15,23,42,.90);
    }

        .footer li a:hover {
            color: var(--sp-blue);
            text-decoration: none;
        }

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-bottom {
    border-top: 1px solid rgba(46,125,50,.16);
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    color: rgba(71,85,105,.95);
}

/* =========================================================
   Forms
========================================================= */
input, textarea, select {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,.12);
    background: rgba(255,255,255,.80);
    color: var(--text);
    outline: none;
}

    input::placeholder, textarea::placeholder {
        color: rgba(71,85,105,.75);
    }

    input:focus, textarea:focus, select:focus {
        border-color: rgba(31,102,209,.45);
        box-shadow: 0 0 0 4px rgba(31,102,209,.12);
    }

/* =========================================================
   Gallery (Images only) - FIXED (works all screens)
========================================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 16px;
}

.gallery-item {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(46,125,50,.12);
    background: rgba(255,255,255,.65);
    box-shadow: var(--shadow);
    cursor: zoom-in;
    transition: transform .18s ease, box-shadow .18s ease;
}

    .gallery-item:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow2);
    }

    .gallery-item img {
        width: 100%;
        height: 240px;
        object-fit: cover;
        display: block;
    }

.gallery-cap {
    padding: 10px 12px;
    font-size: 13px;
    color: rgba(71,85,105,.95);
    font-weight: 800;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.72);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 99999;
}

    .lightbox.show {
        display: flex;
    }

    .lightbox img {
        max-width: min(1100px,96vw);
        max-height: 86vh;
        border-radius: 18px;
        box-shadow: 0 28px 80px rgba(0,0,0,.45);
        background: #fff;
    }

.lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.12);
    color: #fff;
    cursor: pointer;
    font-size: 20px;
}

/* =========================================================
   Responsive
========================================================= */
@media (max-width:1100px) {
    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: inline-block;
    }
}

@media (max-width:980px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .grid3 {
        grid-template-columns: 1fr;
    }

    .grid2 {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
