/* Modern Design Tokens */
:root {
    --pmii-primary: #2c5aa0;
    --pmii-primary-dark: #1e3a8a;
    --pmii-primary-light: #3b82f6;
    --pmii-accent: #00d4ff;
    --pmii-accent-light: #60a5fa;
    --events-accent: #00c389;
    --events-dark: #018f66;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    color: var(--gray-800);
    background-color: #ffffff;
}

/* Typography Scale & Utilities */
h1,
.h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h2,
.h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1.25rem;
}

h3,
.h3 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1rem;
}

h4,
.h4 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.875rem;
}

h5,
.h5 {
    font-size: clamp(1.125rem, 1.5vw, 1.25rem);
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

h6,
.h6 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

p,
.lead {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    color: var(--gray-600);
}

.lead {
    font-size: clamp(1.125rem, 1.5vw, 1.25rem);
    font-weight: 400;
    color: var(--gray-700);
}

small,
.small {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-500);
}

/* Navbar & Brand */
.navbar-brand {
    font-weight: bold;
    color: var(--pmii-primary) !important;
    display: flex;
    align-items: center;
    max-width: 80%;
    /* Prevent taking up full width on mobile */
}

.brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar {
    transition: box-shadow .3s ease, background-color .3s ease;
    backdrop-filter: saturate(140%) blur(8px);
    min-height: 60px;
    position: relative;
    z-index: 1050;
}

.navbar.scrolled {
    box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
    background-color: rgba(255, 255, 255, .95) !important;
}

/* Ensure dropdown is always on top */
.navbar .dropdown {
    position: static;
}

@media (min-width: 992px) {
    .navbar .dropdown {
        position: relative;
    }
}

/* Navbar Links with Underline Animation */
.navbar .nav-link {
    position: relative;
    padding: .5rem .75rem;
    display: flex;
    align-items: center;
    height: 100%;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--gray-700);
    font-weight: 500;
}

.navbar .nav-link.active,
.navbar .nav-link:focus,
.navbar .nav-link:hover {
    color: var(--pmii-primary-dark) !important;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    left: .75rem;
    right: .75rem;
    bottom: .25rem;
    height: 2px;
    background: linear-gradient(90deg, var(--pmii-accent), var(--pmii-primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    transform: scaleX(1);
}

/* Dropdown Styles */
.dropdown-menu-custom,
.dropdown-menu {
    border: 1px solid rgba(0, 0, 0, .05);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    margin-top: 0.5rem;
    background-color: #fff;
    z-index: 1060 !important;
    position: absolute !important;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--gray-50);
    color: var(--pmii-primary);
    transform: translateX(4px);
}

.dropdown-header {
    color: var(--pmii-primary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
}

/* Mobile Navbar */
@media (max-width: 991.98px) {
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        border-radius: 12px;
        background: rgba(44, 90, 160, 0.05);
    }

    .navbar-toggler:focus {
        box-shadow: none;
        background: rgba(44, 90, 160, 0.1);
    }

    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
        border: 1px solid var(--gray-100);
        z-index: 1060;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        width: 100%;
        justify-content: flex-start;
    }

    .navbar-nav .nav-link:hover {
        background-color: var(--gray-50);
    }

    .navbar-nav .nav-link.active {
        background-color: var(--pmii-primary);
        color: white !important;
    }

    .navbar-nav .nav-link.active::after {
        display: none;
    }

    /* Mobile dropdown fixes */
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        border: none;
        background: var(--gray-50);
        margin: 0.5rem 0;
        border-radius: 8px;
    }
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: 999px;
    /* Rounded pill style for elegance */
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--pmii-primary), var(--pmii-primary-light));
    border: none;
    box-shadow: 0 4px 14px rgba(44, 90, 160, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--pmii-primary-dark), var(--pmii-primary));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #fbbf24);
    border: none;
    color: white;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

/* Mobile Navbar Tweaks */
@media (max-width: 576px) {
    .navbar-brand .brand-text {
        font-size: 0.9rem;
        /* Smaller font on mobile */
        white-space: normal;
        /* Allow wrapping if needed */
        line-height: 1.2;
    }

    .navbar-brand img {
        height: 32px !important;
        /* Smaller logo */
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
    color: #fff;
    padding: clamp(80px, 10vw, 140px) 0;
    overflow: hidden;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.hero-title {
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(45deg, #60a5fa, #fde047, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.hero-subtitle,
.hero-section .lead {
    color: rgba(255, 255, 255, 0.9) !important;
    /* Override default lead color */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    /* Improve readability */
}

.hero-frame {
    position: relative;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.hero-actions .btn-light {
    background: white;
    color: var(--pmii-primary);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.hero-actions .btn-light:hover {
    background: var(--gray-50);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    color: var(--pmii-primary-dark);
}

.hero-actions .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#hero-3d-background canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}


/* CTA Section */
.section-cta {
    background: linear-gradient(135deg, var(--pmii-primary) 0%, #1e40af 100%);
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

.section-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.4;
    pointer-events: none;
}

.section-cta::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(0, 212, 255, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.section-cta .h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.section-cta .lead {
    color: #ffffff;
    opacity: 0.95;
}

.section-cta .container {
    position: relative;
    z-index: 2;
}

.section-cta .btn {
    padding: 1rem 2.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.section-cta .btn-light {
    background: white;
    color: var(--pmii-primary);
    border: none;
}

.section-cta .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    background: #f8fafc;
}

.section-cta .btn-outline-light {
    border-width: 2px;
}

.section-cta .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2c5aa0 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    color: white;
    margin-bottom: 0;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

.page-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    border-radius: 50%;
}

.page-header h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-header .lead {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* About Section */
.section-about {
    background-color: var(--gray-50);
    position: relative;
}

/* Cards */
.card {
    border: none;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.card-body {
    padding: 2rem;
}

/* Stat Cards */
.stat-card-modern {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
}

.stat-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-bottom-color: var(--pmii-primary);
}

.stat-icon-modern {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--pmii-primary-light), var(--pmii-primary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 20px rgba(44, 90, 160, 0.2);
    transition: transform 0.3s ease;
}

.stat-card-modern:hover .stat-icon-modern {
    transform: scale(1.1) rotate(5deg);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--gray-900), var(--gray-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.stat-description {
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.4;
    font-weight: 500;
}

/* Footer */
.footer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 80px 0 40px;
}

.footer h5 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: white;
    margin-right: 0.75rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.social-links a:hover {
    background: var(--pmii-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(44, 90, 160, 0.3);
}

/* Utilities */
.separator svg {
    display: block;
    width: 100%;
    height: auto;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}