@import url('https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100..900;1,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    /* Primary Colors - HSL for flexiblity */
    --primary-h: 330;
    --primary-s: 100%;
    --primary-l: 50%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));

    --secondary-h: 185;
    --secondary-s: 100%;
    --secondary-l: 47%;
    --secondary: hsl(var(--secondary-h), var(--secondary-s), var(--secondary-l));

    --accent-h: 270;
    --accent-s: 100%;
    --accent-l: 50%;
    --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));

    /* Theme Colors - Light Mode */
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --text: #121212;
    --text-muted: #6c757d;
    --border: #e9ecef;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.85);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--primary), var(--accent));
    --grad-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-primary: 0 10px 30px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.3);

    /* Spacing & Transitions */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --container-max: 1320px;
    --section-padding: 100px;
}

[data-theme="dark"] {
    --bg: #0a0a0b;
    --bg-alt: #121214;
    --text: #f8f9fa;
    --text-muted: #a0a0a5;
    --border: #1f1f23;
    --card-bg: #161619;
    --nav-bg: rgba(10, 10, 11, 0.85);

    --grad-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.1));
}

/* Global Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Urbanist', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    border-radius: 8px;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-padding) 0;
}

.text-primary {
    color: var(--primary);
}

.text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    background: var(--grad-primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
    z-index: -1;
}

.btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.btn-outline:hover {
    color: #fff;
}

/* Navbar Extension */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: var(--transition);
}

header.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 40px 0 20px;
    border-bottom: 1px solid var(--border);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-weight: 600;
    font-size: 1.05rem;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--grad-primary);
    transition: var(--transition);
}

.nav-item:hover .nav-link::after,
.nav-link.active::after,
.nav-link.parent-active::after {
    width: 100%;
}

.nav-link.active,
.nav-link.parent-active {
    color: var(--primary);
}

/* Header over dark backgrounds in Light Mode */
[data-theme="light"] header.header-light-content:not(.scrolled) .nav-link,
[data-theme="light"] header.header-light-content:not(.scrolled) .logo,
[data-theme="light"] header.header-light-content:not(.scrolled) .nav-link i {
    color: #fff;
}

[data-theme="light"] header.header-light-content:not(.scrolled) .nav-link.active,
[data-theme="light"] header.header-light-content:not(.scrolled) .nav-link.parent-active {
    color: var(--primary) !important;
}

[data-theme="light"] header.header-light-content:not(.scrolled) .mobile-toggle span {
    background-color: #fff;
}

[data-theme="light"] header.scrolled .nav-link,
[data-theme="light"] header.scrolled .logo {
    color: var(--text);
}

/* Slider Specifics */
.hero-slider .slide {
    display: none;
    animation: zoom-fade 8s infinite alternate;
}

.hero-slider .slide.active {
    display: block;
}

@keyframes zoom-fade {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

/* Background Overlay Refinement */
.bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgb(0, 0, 0), rgba(0, 0, 0, 0.922));
    z-index: 1;
}

.bg-overlay-radial {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent, rgb(0, 0, 0));
    z-index: 1;
}

/* Hero Slider Index 2 */
.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slider .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-slider .slide.active {
    opacity: 0.7;
}

/* Dropdown Premium */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    min-width: 240px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 24px;
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-item:hover,
.dropdown-item.active {
    background: var(--bg-alt);
    color: var(--primary);
    padding-left: 30px;
}

/* Theme Toggle Button */
.theme-switch {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.theme-switch:hover {
    transform: rotate(30deg);
    border-color: var(--primary);
}

/* Hero Section Refinement */
.hero-v1 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px;
    background-image: url('../images/hero-elephant.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-v1::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.731);
    /* The Dark Overlay */
    z-index: 0;
}

.hero-bg {
    display: none;
}

.hero-content {
    max-width: 850px;
    position: relative;
    z-index: 1;
    /* Stay above the overlay */
}

.hero-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 24px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    margin-bottom: 24px;
    line-height: 1.1;
    color: #fff;
}

.hero-desc {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Animations */
[data-aos] {
    transition-duration: 800ms !important;
}

/* --- Responsive Excellence --- */

/* Mobile Toggle Hamburger */
.mobile-toggle {
    display: none;
    width: 300px;
    /* Placeholder for width logic if needed, but usually icons */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--text);
    transition: var(--transition);
    border-radius: 3px;
}

/* Animations for Toggle */
.mobile-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .container {
        padding: 0 20px;
    }
}

@media (max-width: 991px) {

    /* Mobile Menu Drawer */
    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        padding-top: 80px;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .dropdown-menu {
        position: relative;
        top: 0;
        left: 0;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        background: var(--bg-alt);
        text-align: center;
        width: 100%;
        display: none;
        /* Initially hidden, toggle via JS if needed */
        margin-top: 10px;
    }

    .nav-item:hover .dropdown-menu {
        display: block;
    }

    /* Layout Adjustments */
    .hero-title {
        font-size: 3.5rem;
    }

    /* Auto-stacking grids */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: repeat(2, 1fr)"],
    [style*="grid-template-columns: repeat(3, 1fr)"],
    [style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* Specific Section Overrides */
    div[style*="display: grid"][style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .portfolio-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .logo {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .btn {
        width: 100%;
    }

    /* Adjust Dashboard Cards */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    /* Before/After Slider Adjustments */
    .before-after-slider {
        height: 300px !important;
    }
}

/* --- Dashboard Responsiveness --- */
.sidebar {
    width: 280px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    transition: var(--transition);
    z-index: 1100;
    /* Above header if needed */
}

.dashboard-content {
    margin-left: 280px;
    padding: 20px;
    width: calc(100% - 280px);
    transition: var(--transition);
    min-height: 100vh;
    background-color: var(--bg);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 20px;
}

.sidebar-toggle-btn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-primary);
    z-index: 1200;
    cursor: pointer;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .dashboard-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .sidebar-toggle-btn {
        display: flex;
    }
}

/* Theme Switch Button */
.theme-switch {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-switch:hover {
    background: var(--border);
    transform: rotate(15deg);
}

/* Scope moon/sun override ONLY to the header <button> toggle, not footer social <a> links */
[data-theme="dark"] button.theme-switch i::before {
    content: "\f186";
    /* moon icon */
}

[data-theme="light"] button.theme-switch i::before {
    content: "\f185";
    /* sun icon */
}

/* Footer social icon buttons — same circle look but icons are NOT overridden */
.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}

.social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.4);
}

/* Dashboard Global Header Integration */
.dashboard-container header {
    z-index: 2000;
    /* Ensure it stays above dashboard elements */
}

.dashboard-container .sidebar {
    padding-top: 0px;
    /* Space for fixed global header */
}

.dashboard-container .dashboard-content {
    padding-top: 0px;
    /* Space for fixed global header */
}

@media (max-width: 991px) {
    .dashboard-container .dashboard-content {
        padding-top: 130px;
    }

    .sidebar-toggle-btn {
        top: 100px;
        /* Adjust toggle position */
    }
}