/* ========================================
   MODERN GLASSMORPHIC DESIGN 
   Organic Puff Navbar with Smooth Transitions
======================================== */

/* === GLOBALS & VARIABLES === */
:root {
    --color-green: #4f841c;
    --color-green-light: #6ba82a;
    --color-dark-blue: #244b8e;
    --color-light-blue: #b6dbef;
    --color-accent: #38bdf8;
    
    /* Gradients */
    --bg-gradient: radial-gradient(ellipse at top, #e0f2fe 0%, #f0fdf4 50%, #ffffff 100%);
    --glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(36, 75, 142, 0.08);
    --shadow-md: 0 8px 24px rgba(36, 75, 142, 0.12);
    --shadow-lg: 0 16px 48px rgba(36, 75, 142, 0.15);
    
    /* Spacing */
    --navbar-height: 64px;
}

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

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; 
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: #1e293b; 
    overflow-x: hidden;
    line-height: 1.7;
    position: relative;
}

/* === GLASSMORPHIC UTILITIES === */
.glass-card {
    background: var(--glass-gradient);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-md);
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.brand-color { color: var(--color-green); }
.brand-text { color: var(--color-dark-blue); }

/* === BUTTONS === */
.btn-custom { 
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-light) 100%);
    color: white; 
    border-radius: 50px; 
    padding: 12px 32px; 
    font-weight: 600; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    border: none;
    box-shadow: 0 4px 16px rgba(79, 132, 28, 0.3);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-custom:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 24px rgba(79, 132, 28, 0.4); 
    color: white; 
}

.btn-outline-custom {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    color: var(--color-dark-blue);
    border: 2px solid var(--color-green);
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-outline-custom:hover {
    background: var(--color-green);
    color: white;
    transform: translateY(-2px);
}

/* === DECORATIVE BACKGROUND === */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.bubble-1 {
    width: 400px;
    height: 400px;
    background: var(--color-light-blue);
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.bubble-2 {
    width: 300px;
    height: 300px;
    background: var(--color-green);
    top: 60%;
    right: -5%;
    animation-delay: 5s;
}

.bubble-3 {
    width: 200px;
    height: 200px;
    background: var(--color-accent);
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(-40px) rotate(-5deg); }
    75% { transform: translateY(-20px) rotate(3deg); }
}

/* ========================================
   ORGANIC PUFF NAVBAR
   
   The puff, junction curves, and bar all share
   the same background (--nav-bg). They overlap
   to form one continuous surface.
   
   filter: drop-shadow() on the wrapper traces
   ONE unified shadow around the combined shape,
   making them look like a single pulled material.
   
   Geometry:
     Puff: 100px circle, center 30px above bar top
     At bar-top level, circle is 80px wide
     Junction curves: 25x25px filled with concave corner
======================================== */

.header-wrapper {
    --nav-bg: rgba(255, 255, 255, 0.90);
    
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 1400px;
    z-index: 1000;
    /* Padding pushes the bar down, making room for the puff above */
    padding-top: 80px;
    /* ONE unified shadow around the entire organic shape */
    filter: drop-shadow(0 6px 24px rgba(36, 75, 142, 0.12));
    transition: padding-top 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s ease;
}

/* === THE BAR === */
.navbar-bar {
    height: 64px;
    background: var(--nav-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px;
    position: relative;
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link-custom {
    color: var(--color-dark-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-green);
    transition: width 0.3s ease;
}

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

.nav-link-custom:hover::after {
    width: 100%;
}

/* === THE PUFF: Circle pulled from the bar === */
.brand-puff {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;       /* starts at wrapper's very top (above the bar) */
    width: 100px;
    height: 100px;
    background: var(--nav-bg);       /* SAME as bar */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-puff img {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-puff:hover img {
    transform: scale(1.06);
}

/* === JUNCTION CURVES: Smooth the puff-to-bar transition ===
   These are filled rectangles with one concave corner.
   The concave corner (border-radius) creates the smooth
   organic curve at the junction — like pulled material. */
.puff-curve {
    position: absolute;
    top: 55px;          /* = padding-top(80) - curve_height(25) */
    width: 25px;
    height: 25px;
    background: var(--nav-bg);       /* SAME as bar & puff */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.puff-curve-left {
    left: calc(50% - 65px);   /* 50% - puff_half_width_at_bar(40) - curve_width(25) */
    border-bottom-right-radius: 25px;
}

.puff-curve-right {
    right: calc(50% - 65px);
    border-bottom-left-radius: 25px;
}

/* === SCROLLED: Puff merges smoothly into the bar === */
.header-wrapper.scrolled {
    padding-top: 0;
    width: 100%;
    max-width: 100%;
    filter: drop-shadow(0 2px 10px rgba(36, 75, 142, 0.08));
}

.header-wrapper.scrolled .navbar-bar {
    height: 60px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
}

.header-wrapper.scrolled .brand-puff {
    top: 7px;
    width: 46px;
    height: 46px;
}

.header-wrapper.scrolled .brand-puff img {
    width: 36px;
    height: 36px;
}

.header-wrapper.scrolled .puff-curve {
    opacity: 0;
    transform: scale(0);
    top: 25px;
}

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

.hero-section {
    padding-top: 180px;
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 800px;
    margin-bottom: 4rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(79, 132, 28, 0.1);
    color: var(--color-green);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(79, 132, 28, 0.2);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-dark-blue);
    margin-bottom: 1.5rem;
}

.highlight {
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight-alt {
    color: var(--color-dark-blue);
    position: relative;
    display: inline-block;
}

.highlight-alt::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 15px;
    background: rgba(182, 219, 239, 0.4);
    z-index: -1;
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #475569;
    line-height: 1.8;
}

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

.hero-image-card {
    position: relative;
}

.hero-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    height: 500px;
}

.hero-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-img-overlay {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-md);
}

.stat-badge i {
    color: var(--color-green);
    font-size: 1.5rem;
}

.stat-badge span {
    font-weight: 600;
    color: var(--color-dark-blue);
}

/* ========================================
   SECTIONS
======================================== */

.services-section,
.features-section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(79, 132, 28, 0.1);
    color: var(--color-green);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(79, 132, 28, 0.2);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--color-dark-blue);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: #64748b;
}

/* ========================================
   SERVICE CARDS
======================================== */

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--color-green) 0%, var(--color-green-light) 100%);
    transition: height 0.4s ease;
}

.service-card:hover::before {
    height: 100%;
}

.service-card-featured {
    border: 2px solid var(--color-green);
    position: relative;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-green);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(79, 132, 28, 0.1) 0%, rgba(107, 168, 42, 0.1) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.service-icon i {
    font-size: 2rem;
    color: var(--color-green);
}

.service-icon-featured {
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-light) 100%);
}

.service-icon-featured i {
    color: white;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-bottom: 1rem;
}

.service-desc {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-features li {
    padding: 0.5rem 0;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-features li i {
    color: var(--color-green);
    font-size: 0.9rem;
}

/* ========================================
   FEATURE BOXES
======================================== */

.feature-box {
    text-align: center;
    padding: 2rem 1rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--color-green);
}

.feature-box:hover .feature-icon {
    transform: translateY(-8px) scale(1.1);
    box-shadow: var(--shadow-md);
    background: var(--color-green);
}

.feature-box:hover .feature-icon i {
    color: white;
}

.feature-box h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-bottom: 0.75rem;
}

.feature-box p {
    color: #64748b;
    margin: 0;
}

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

.footer-section {
    padding: 80px 0 40px;
}

.footer-content {
    padding: 3rem;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.footer-title i {
    color: var(--color-green);
}

.footer-text {
    color: #64748b;
    line-height: 1.7;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-green);
    padding-left: 5px;
}

.footer-contact p {
    color: #64748b;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.footer-contact i {
    color: var(--color-green);
    width: 20px;
}

.footer-contact a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--color-green);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(100, 116, 139, 0.2);
    text-align: center;
}

.footer-bottom p {
    color: #94a3b8;
    margin: 0;
}

/* ========================================
   ANIMATIONS
======================================== */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1024px) {
    .hero-section {
        padding-top: 180px;
    }
    
    .navbar-content {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-wrapper {
        width: calc(100% - 2rem);
        padding-top: 65px;
    }
    
    .navbar-bar {
        height: 56px;
    }
    
    .navbar-content {
        padding: 0 1rem;
    }
    
    .brand-name {
        font-size: 1.05rem;
    }
    
    .brand-puff {
        width: 84px;
        height: 84px;
    }
    
    .brand-puff img {
        width: 64px;
        height: 64px;
    }
    
    /* Recalculate curves for smaller puff 
       Puff 84px, r=42. Center at 42, bar at 65. Dist=23.
       Half-width = sqrt(42^2-23^2) = sqrt(1764-529) = sqrt(1235) ~ 35px.
       Curve: 22x22, left = calc(50% - 35 - 22) = calc(50% - 57px) */
    .puff-curve {
        width: 22px;
        height: 22px;
        top: 43px; /* 65 - 22 */
    }
    
    .puff-curve-left {
        left: calc(50% - 57px);
        border-bottom-right-radius: 22px;
    }
    
    .puff-curve-right {
        right: calc(50% - 57px);
        border-bottom-left-radius: 22px;
    }
    
    .header-wrapper.scrolled .navbar-bar {
        height: 52px;
    }
    
    .hero-section {
        padding-top: 160px;
        padding-bottom: 60px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn-custom,
    .hero-actions .btn-outline-custom {
        width: 100%;
        justify-content: center;
    }
    
    .hero-img-wrapper {
        height: 350px;
    }
    
    .services-section,
    .features-section {
        padding: 60px 0;
    }
    
    .service-card,
    .footer-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-img-wrapper {
        height: 300px;
    }
    
    .btn-custom,
    .btn-outline-custom {
        padding: 10px 24px;
        font-size: 0.95rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
}
