/* Global Styles */
body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
    background-color: #09090a; /* Fallback */
    background-image: url("index-section-1.avif"); /* Relative to css file location if simple, or root relative */
    /* Note: if custom.css is in assets/, url("index-section-1.avif") works if the image is in assets/ too. */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    color: white; /* Ensure text is white by default */
}

/* Global Overlay using pseudo-element to avoid HTML changes */
body:not(#home)::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.85),
            rgba(0, 0, 0, 0.70),
            rgba(0, 0, 0, 0.60));
    z-index: -1;
    z-index: -1;
    pointer-events: none;
}

/* Glass Panel Utility */
.glass-panel {
    background: rgba(25, 25, 27, 0.6); /* Semi-transparent dark background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Navigation & Header --- */
header {
    position: relative;
    z-index: 100;
}

header nav a,
header nav span,
header nav button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

header nav a:hover {
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* --- Dropdown Styles (Fixed) --- */
.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* The content box */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #09090a;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 0;
    top: 100%; /* Position right below the parent */
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px; /* Visual gap */
}

/* Triangle */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent rgba(255, 255, 255, 0.1) transparent;
}

/* BRIDGE FIX: Invisible area to bridge the gap between link and menu */
.dropdown-content::after {
    content: '';
    position: absolute;
    top: -20px; /* Covers the 10px margin plus buffer */
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.dropdown-content a {
    color: #d1d5db;
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ff5a5a;
    padding-left: 24px;
}

/* Show on hover */
.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* --- Mobile Menu --- */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background-color: #09090a !important;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
}

.mobile-menu-overlay.open {
    transform: translateX(0);
}

.mobile-menu-link {
    font-size: 1.5rem;
    color: white;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* --- Common Components --- */

.hero-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.hero-btn:hover::before {
    width: 300px;
    height: 300px;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}

/* --- Info Cards (from index) --- */
.info-card {
    background: #09090a;
    border-radius: 14px;
    padding: 30px;
    height: 270px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
    cursor: pointer;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: #ff5a5a;
}

.info-card h4 {
    font-size: 15px;
    font-weight: 500;
    color: #7aa2ff;
    margin: 18px 0 12px;
    line-height: 1.4;
    transition: transform 0.3s ease;
}

.info-card:hover h4 {
    transform: translateX(5px);
}

.info-card p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    font-weight: 300;
}

.info-card::after {
    content: "";
    position: absolute;
    bottom: 18px;
    left: 30px;
    width: 46px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
}
