/* ==========================================
   MODULE 1: ROOT VARIABLES & GLOBAL RESET
   ========================================== */

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

:root {
    --main-green: #63cbac;
    --dark-bg: #0e0a0a;

    /* WhatsApp Theme Variables (later modules use this) */
    --wa-main: #25D366;
    --wa-gradient: linear-gradient(135deg, #25D366 0%, #075e54 100%);
    --wa-glow: 0 15px 35px rgba(37, 211, 102, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;

    /* Mobile overflow safety */
    backface-visibility: hidden;
}


/* ==========================================
   MODULE 2: SIDEBAR SECTION (Fixed Panel)
   ========================================== */

.sidebar {
    width: 260px;
    max-width: 260px;              /* 🔥 width leak fix */
    height: 100vh;
    background: var(--dark-bg);
    position: fixed;
    top: 0;
    left: 0;
    text-align: center;
    padding: 40px 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;            /* 🔥 mobile overflow fix */
}

.profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 8px solid #282828;
    margin: 0 auto 15px;
}

.profile-name {
    color: #fff;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Sidebar Navigation */
.nav-links {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    margin-bottom: 5px;
}

.nav-links a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    font-size: 18px;
    transition: 0.3s;
}

/* Active + Hover (design same, safe) */
.nav-links a.active {
    color: #ffffff;
    background: transparent;
    transform: none;
}

.nav-links a:hover,
.nav-links a.active:hover {
    color: var(--main-green);
    background: rgba(99, 203, 172, 0.1);
    transform: translateX(5px);
}

/* Social Icons */
.sidebar-social a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    font-size: 18px;
    transition: 0.3s;
}

.sidebar-social a:hover {
    color: var(--main-green);
}


/* ==========================================
   MODULE 3: MAIN CONTENT & HERO SECTION
   ========================================== */

/* Main content wrapper */
.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);   /* 🔥 horizontal overflow fix */
    overflow-x: hidden;          /* 🔥 safety */
}

/* Common section padding */
.section {
    padding: 80px 50px;
    max-width: 100%;
    overflow-x: hidden;          /* 🔥 section leak fix */
}

.gray-bg {
    background: #f8f9fa;
}

/* ================= HERO ================= */

.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;            /* 🔥 MOST IMPORTANT FIX */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

/* 🔥 Video white-scroll FIX */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;            /* 🔥 prevent right overflow */
    object-fit: cover;
    overflow: hidden;
}

/* Dark overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Content on top */
.hero-content {
    position: relative;
    z-index: 5;
    max-width: 100%;
    padding: 0 15px;             /* 🔥 mobile safe */
}

/* Text sizes */
.hero-content h1 {
    font-size: 60px;
    font-weight: 700;
    margin: 10px 0;
}

.welcome-text {
    font-size: 20px;
    font-weight: 500;
    color: var(--main-green);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sub-text {
    font-size: 24px;
    opacity: 0.9;
}

/* ================= MOBILE FIX ================= */

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .sub-text {
        font-size: 18px;
    }
}


/* ==========================================
   MODULE 4: BUTTONS & UI ELEMENTS
   ========================================== */

/* Button container */
.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;              /* 🔥 mobile overflow fix */
    max-width: 100%;
}

/* Primary buttons */
.btn-solid,
.btn-outline {
    padding: 12px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;         /* 🔥 width control */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--main-green);
    color: #fff;
    border: 2px solid var(--main-green);
    max-width: 100%;
    white-space: nowrap;
}

.btn-solid:hover,
.btn-outline:hover {
    background-color: #2183d8;
    border-color: #ecebeb;
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* ============ DOWNLOAD BUTTON (FIZZY) ============ */

.btn-solid-lg {
    position: relative;
    background: var(--main-green);
    color: #fff;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--main-green);
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: inline-flex;         /* 🔥 overflow fix */
    align-items: center;
    justify-content: center;
    overflow: hidden;             /* 🔥 PARTICLE LEAK FIX */
    max-width: 100%;
}

.btn-solid-lg:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(32, 201, 151, 0.3);
}

/* Particle container */
.btn-solid-lg .particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Particles */
.btn-solid-lg .particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--main-green);
    border-radius: 50%;
    opacity: 0;
}

.btn-solid-lg:hover .particle {
    animation: fizz 0.8s ease-out forwards;
}

@keyframes fizz {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--dx), var(--dy)) scale(0);
        opacity: 0;
    }
}

/* Bubble directions */
.particle:nth-child(1) { --dx: -40px; --dy: -40px; }
.particle:nth-child(2) { --dx: 40px;  --dy: -50px; }
.particle:nth-child(3) { --dx: -60px; --dy: 20px;  }
.particle:nth-child(4) { --dx: 50px;  --dy: 40px;  }
.particle:nth-child(5) { --dx: 0px;   --dy: -70px; }
.particle:nth-child(6) { --dx: -30px; --dy: 60px;  }

/* Typing cursor */
.cursor {
    display: inline-block;
    background-color: #fff;
    width: 3px;
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Mobile */
@media (max-width: 768px) {
    .btn-solid,
    .btn-outline,
    .btn-solid-lg {
        width: 100%;
        text-align: center;
    }
}


/* ==========================================
   MODULE 5: ABOUT SECTION & STATS
   ========================================== */

/* Section header */
.header-container {
    position: relative;
    text-align: center;
    margin-bottom: 60px;
    overflow: hidden;                 /* 🔥 watermark overflow fix */
    max-width: 100%;
}

/* Big background text */
.watermark {
    font-size: 100px;
    color: rgba(0, 0, 0, 0.05);
    font-weight: 900;
    letter-spacing: 10px;
    white-space: nowrap;              /* 🔥 line-break chaos fix */
    max-width: 100%;
}

/* Foreground title */
.front-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    color: #333;
    width: 100%;
    padding: 0 15px;                  /* 🔥 mobile safety */
    box-sizing: border-box;
}

/* Underline */
.underline {
    width: 80px;
    height: 3px;
    background: var(--main-green);
    margin: -10px auto 0;
}

/* About layout */
.about-flex {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    max-width: 100%;
    overflow-x: hidden;               /* 🔥 flex overflow fix */
}

.about-left {
    flex: 2;
    text-align: left;
    max-width: 100%;
}

.about-right {
    flex: 1;
    text-align: left;
    max-width: 100%;
}

/* Info list */
.info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    list-style: none;
    word-break: break-word;           /* 🔥 long email fix */
}

/* Stats row */
.about-stats {
    display: flex;
    border-top: 1px solid #eee;
    padding-top: 30px;
    max-width: 100%;
    overflow-x: hidden;
}

.stat-item {
    flex: 1;
    text-align: center;
    border-right: 1px solid #eee;
}

.stat-item:last-child {
    border-right: none;
}

.stat-count {
    font-size: 40px;
    color: #ababab;
}

/* Email link safety */
.email-link {
    color: var(--main-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease-in-out;
    max-width: 100%;
    word-break: break-all;             /* 🔥 mobile email overflow */
}

.email-link:hover {
    color: #1ba37a;
    transform: translateY(-2px);
}

.email-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--main-green);
    transition: width 0.3s ease-in-out;
}

.email-link:hover::after {
    width: 100%;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
    .watermark {
        font-size: 56px;
        letter-spacing: 4px;
    }

    .front-title {
        font-size: 26px;
    }

    .about-flex {
        flex-direction: column;
        gap: 25px;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-item {
        border-right: none;
    }
}



/* ==========================================
   MODULE 6: SERVICES SECTION
   ========================================== */

/* Services grid */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 100%;
    overflow-x: hidden;            /* 🔥 grid overflow fix */
}

/* Service card */
.service-box {
    display: flex;
    gap: 20px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.3s ease; /* 🔥 limit animation */
    max-width: 100%;
}

/* Icon box */
.service-icon {
    background: #fff;
    color: var(--main-green);
    min-width: 60px;
    width: 60px;
    height: 60px;
    flex-shrink: 0;               /* 🔥 prevent flex shrink */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

/* Hover effects (SAFE) */
.service-box:hover .service-icon {
    background: var(--main-green);
    color: #fff;
    transform: translateY(-8px);   /* 🔥 reduced jump */
    box-shadow: 0 10px 20px rgba(32, 201, 151, 0.3);
}

.service-box:hover h4 {
    color: var(--main-green);
}

/* Text safety */
.service-info {
    max-width: 100%;
}

.service-info p {
    word-break: break-word;        /* 🔥 long text fix */
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Disable jump on mobile (no hover) */
    .service-box:hover .service-icon {
        transform: none;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }
}



/* ==========================================
   MODULE 7: PORTFOLIO SECTION
   ========================================== */

/* Portfolio grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    justify-items: center;
    max-width: 100%;
    overflow-x: hidden;            /* 🔥 MAJOR FIX */
}

/* Portfolio item wrapper */
.portfolio-item {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;              /* 🔥 image scale leak fix */
}

/* Image card */
.img-wrapper {
    position: relative;
    width: 80%;
    max-width: 520px;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;              /* 🔥 zoom overflow fix */
    background: #000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s ease;
}

/* Image */
.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
    transition: transform 0.4s ease;
}

/* Hover zoom (SAFE) */
.portfolio-item:hover .img-wrapper img {
    transform: scale(1.05);        /* 🔥 reduced zoom */
}

/* Overlay */
.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
    .img-wrapper {
        width: 90%;
        height: 220px;
    }
}

@media (max-width: 480px) {
    .img-wrapper {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;      /* 🔥 image stretch fix */
    }
}


/* ==========================================
   MODULE 8: HAMBURGER + MOBILE SYSTEM
   ========================================== */

/* ===== HAMBURGER DEFAULT (DESKTOP HIDDEN) ===== */
.hamburger {
    display: none;
}

/* ===== DESKTOP SAFETY ===== */
@media (min-width: 769px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: none;
    }

    .hamburger {
        display: none;
    }
}

/* ===== MOBILE SYSTEM ===== */
@media (max-width: 768px) {

    /* Hamburger button */
    .hamburger {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        background: #0e0a0a;
        color: #fff;
        font-size: 26px;
        padding: 10px 14px;
        border-radius: 6px;
        cursor: pointer;
        z-index: 10001;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    /* Sidebar hidden by default */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100vh;
        background: var(--dark-bg);
        transform: translateX(-100%);   /* 🔥 better than left:-100% */
        transition: transform 0.3s ease;
        z-index: 10000;
        overflow-y: auto;
        overflow-x: hidden;             /* 🔥 horizontal scroll killer */
    }

    /* Sidebar open */
    .sidebar.active {
        transform: translateX(0);
    }

    /* Main content safety */
    .main-content {
        margin-left: 0;
        width: 100%;
        overflow-x: hidden;
    }
}

/* ===== EXTRA SMALL MOBILE ===== */
@media (max-width: 480px) {
    .hamburger {
        font-size: 24px;
        padding: 9px 12px;
    }
}


/* ==========================================
   MODULE 9: RESUME SECTION
   ========================================== */

/* Resume layout */
.resume-wrapper {
    display: flex;
    gap: 40px;
    text-align: left;
    max-width: 100%;
    overflow-x: hidden;              /* 🔥 horizontal scroll killer */
}

/* Columns */
.resume-column {
    flex: 1;
    max-width: 100%;
}

/* Timeline item */
.resume-item {
    position: relative;
    border-left: 2px solid var(--main-green);
    padding: 0 0 30px 20px;
    margin-bottom: 30px;
    max-width: 100%;
    overflow-wrap: break-word;       /* 🔥 long text fix */
}

/* Timeline dot */
.resume-item::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--main-green);
    left: -9px;
    top: 0;
    border-radius: 50%;
}

/* Date badge */
.date-badge {
    background: var(--main-green);
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 10px;
    max-width: 100%;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
    .resume-wrapper {
        flex-direction: column;
        gap: 25px;
    }

    .resume-item {
        padding-left: 18px;          /* 🔥 edge clipping fix */
    }

    .resume-item::after {
        left: -8px;
    }
}


/* ==========================================
   MODULE 10: CONTACT SECTION
   ========================================== */

.contact-section {
    padding: 100px 50px;
    background-color: #ffffff;
    max-width: 100%;
    overflow-x: hidden;              /* 🔥 horizontal scroll killer */
}

/* Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    max-width: 1200px;
    margin: 40px auto 0;
    text-align: left;
    overflow-x: hidden;              /* 🔥 grid overflow fix */
}

/* Contact info cards */
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: #fff;
    border-radius: 15px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    max-width: 100%;
}

/* Hover desktop only */
@media (hover: hover) {
    .contact-info-item:hover {
        transform: translateX(10px);
        border-color: var(--main-green);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    }
}

/* Icons */
.contact-icon {
    min-width: 55px;
    height: 55px;
    background: rgba(99, 203, 172, 0.1);
    color: var(--main-green);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 22px;
    flex-shrink: 0;                  /* 🔥 icon shrink fix */
}

/* Links */
.contact-info-item a {
    text-decoration: none !important;
    color: inherit;
    font-weight: 500;
    word-break: break-word;          /* 🔥 email/phone overflow fix */
}

/* Form container */
.contact-form-container {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow-x: hidden;
}

/* Form rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* Inputs */
.input-group {
    position: relative;
    margin-bottom: 35px;
    max-width: 100%;
}

.input-group input,
.input-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 2px solid #ddd;
    background: transparent;
    outline: none;
    font-size: 16px;
    transition: 0.3s;
}

/* Floating labels */
.input-group label {
    position: absolute;
    left: 0;
    top: 10px;
    color: #999;
    transition: 0.3s;
    pointer-events: none;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:valid ~ label {
    top: -15px;
    font-size: 12px;
    color: var(--main-green);
}

/* Submit button */
.btn-send {
    background: var(--main-green);
    color: #fff;
    border: none;
    padding: 15px 45px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: 0.4s;
    max-width: 100%;
}

@media (hover: hover) {
    .btn-send:hover {
        background: #222;
        transform: translateY(-5px);
    }
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
    .contact-section {
        padding: 80px 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-container {
        padding: 30px 20px;
    }
}


/* ==========================================
   MODULE 11: WHATSAPP WIDGET (FIXED & SAFE)
   ========================================== */

/* WhatsApp theme vars (isolated) */
:root {
    --wa-main: #25D366;
    --wa-gradient: linear-gradient(135deg, #25D366 0%, #075e54 100%);
    --wa-glow: 0 15px 35px rgba(37, 211, 102, 0.45);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
}

/* ===== CONTAINER ===== */
.wa-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 999999;
    max-width: calc(100vw - 20px);   /* 🔥 overflow guard */
}

/* Mobile position fix */
@media (max-width: 480px) {
    .wa-container {
        right: 12px;
        bottom: 15px;
    }
}

/* ===== TRIGGER BUTTON ===== */
.wa-trigger {
    width: 64px;
    height: 64px;
    background: var(--wa-gradient);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #fff;
    box-shadow: var(--wa-glow);
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}

.wa-trigger i {
    color: #fff;
    font-size: 30px;
}

/* Hover only on desktop */
@media (hover: hover) {
    .wa-trigger:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(37, 211, 102, 0.6);
    }
}

/* ===== POPUP ===== */
.wa-popup {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: min(340px, calc(100vw - 20px)); /* 🔥 never overflow */
    background: var(--glass-bg);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-radius: 26px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
}

/* Active */
.wa-popup.active {
    display: flex;
    animation: waOpen 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes waOpen {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== HEADER ===== */
.wa-header {
    background: var(--wa-gradient);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}

.wa-profile-pic {
    width: 48px;
    height: 48px;
    position: relative;
    flex-shrink: 0;
}

.wa-profile-pic img {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.online-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #00ff00;
    border: 2px solid #075e54;
    border-radius: 50%;
}

.wa-header-info h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.wa-header-info span {
    display: block;
    font-size: 12px;
    opacity: 0.9;
}

/* Close */
.wa-close {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
}

/* ===== BODY ===== */
.wa-body {
    padding: 20px;
    background: rgba(255, 255, 255, 0.35);
}

.wa-chat-bubble {
    background: #fff;
    padding: 16px;
    border-radius: 18px 18px 18px 6px;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.6;
    margin-bottom: 18px;
    word-break: break-word;          /* 🔥 text overflow fix */
}

/* CTA */
.wa-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--wa-gradient);
    color: #fff;
    text-decoration: none;
    padding: 14px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
    .wa-action-btn:hover {
        transform: scale(1.04);
        box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
    }
}


/* ==========================================
   MODULE 12: FOOTER SECTION (FIXED)
   ========================================== */

.portfolio-footer {
    background: linear-gradient(135deg, #0b1220, #0f172a);
    color: #cbd5f5;
    padding: 70px 20px 30px;
    margin-left: 260px;              /* desktop sidebar space */
    position: relative;
    z-index: 1;
    max-width: 100%;
    overflow-x: hidden;              /* 🔥 horizontal scroll killer */
}

/* Footer layout */
.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    width: 100%;
}

/* Columns */
.footer-col h3 {
    color: var(--main-green);
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-col p,
.footer-col li {
    font-size: 14px;
    color: #cbd5f5;
    margin-bottom: 8px;
    list-style: none;
    word-break: break-word;          /* 🔥 long links fix */
}

.footer-col ul {
    padding: 0;
    margin: 0;
}

/* Links */
.footer-col a {
    color: #cbd5f5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--main-green);
    text-decoration: underline;
}

/* Bottom bar */
.footer-bottom {
    text-align: center;
    border-top: 1px solid #1e293b;
    margin-top: 50px;
    padding-top: 20px;
    font-size: 14px;
    color: #94a3b8;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
    .portfolio-footer {
        margin-left: 0;              /* 🔥 sidebar margin remove */
        padding: 60px 16px 25px;
        text-align: center;
    }

    .footer-container {
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .portfolio-footer {
        padding: 50px 14px 20px;
    }
}




/* ===== Portfolio Card Overlay ===== */

.img-wrapper {
    position: relative;
    overflow: hidden;
}

/* Overlay layer */
.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85),
        rgba(0, 0, 0, 0.45),
        transparent
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

/* Project title */
.overlay h4 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ===== Buttons container ===== */

.project-actions {
    display: flex;
    gap: 12px;
}

/* Common button */
.project-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

/* Live button */
.live-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.live-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(176, 3, 3, 0.5);
}

/* GitHub button */
.git-btn {
    background: linear-gradient(135deg, #0353ff, #000);
}

.git-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

/* ===== Mobile Optimization ===== */
@media (max-width: 768px) {
    .overlay {
        padding: 16px;
        align-items: center;
        text-align: center;
    }

    .overlay h4 {
        margin-bottom: 10px;
    }

    .project-actions {
        justify-content: center;
    }

    /* icon-only buttons */
    .project-btn span {
        display: none;
    }

    .project-btn {
        width: 46px;
        height: 46px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}
