/* ============================================
   Lanka Global Access — Shared Design System
   ============================================ */

:root {
    --primary-color: #1e40af;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

.font-display {
    font-family: 'Playfair Display', serif;
}

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

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }

/* Loader */
.loader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    white-space: nowrap;
    transition: all 0.3s ease;
}

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

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

.nav-link.active {
    color: var(--primary-color) !important;
}

@media (min-width: 1280px) and (max-width: 1350px) {
    .desktop-navigation {
        gap: 12px !important;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .brand-details {
        display: none !important;
    }

    .desktop-navigation {
        gap: 8px !important;
        margin-left: 12px !important;
        font-size: 0.75rem;
    }

    .brand-details p {
        display: none;
    }
}

/* Desktop dropdowns */
.nav-item { position: relative; }

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 8px);
    min-width: 230px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 60;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 4px);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: #eff6ff;
    color: var(--primary-color);
    transform: translateX(4px);
}

.dropdown-menu a i {
    width: 18px;
    text-align: center;
    color: var(--secondary-color);
}

/* Mobile menu */
#mobile-menu {
    background: white !important;
    backdrop-filter: none !important;
}

#mobile-menu a {
    color: #1f2937 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

#mobile-menu a:hover {
    color: #3b82f6 !important;
    transform: translateX(10px);
}

.mobile-submenu {
    display: none;
    padding-left: 16px;
}

.mobile-submenu.open { display: block; }

.mobile-accordion-toggle i { transition: transform 0.3s ease; }
.mobile-accordion-toggle.open i.fa-chevron-down { transform: rotate(180deg); }

/* Buttons */
.btn-primary {
    display: inline-block;
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: white;
    padding: 14px 32px;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.35);
    transform: translateY(-2px) scale(1.02);
}

.btn-outline {
    display: inline-block;
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* Section headers */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.title-bar {
    width: 70px;
    height: 4px;
    border-radius: 2px;
    background: var(--gradient-primary);
    margin: 0 auto 20px;
}

/* Cards */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
}

/* Page hero banner (subpages) */
.page-hero {
    position: relative;
    padding: 170px 0 90px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'%3E%3Cpolygon fill='rgba(255,255,255,0.06)' points='0,1000 1000,0 1000,1000'/%3E%3C/svg%3E"),
        linear-gradient(135deg, #1e3a8a 0%, #1e40af 55%, #2563eb 100%);
    color: white;
    overflow: hidden;
}

.university-detail-hero {
    padding: 0 0 45px;
}

.university-detail-content table {
    table-layout: fixed;
}

.university-detail-content th:nth-child(1),
.university-detail-content td:nth-child(1) { width: 46%; }
.university-detail-content th:nth-child(2),
.university-detail-content td:nth-child(2) { width: 18%; }
.university-detail-content th:nth-child(3),
.university-detail-content td:nth-child(3) { width: 16%; }
.university-detail-content th:nth-child(4),
.university-detail-content td:nth-child(4) { width: 20%; }

@media (max-width: 767px) {
    .university-detail-hero .container,
    .university-detail-content > .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .university-detail-hero figure {
        margin-bottom: 24px;
    }

    .university-detail-hero figcaption {
        padding: 16px;
    }

    .university-detail-hero figcaption h1 {
        font-size: 1.5rem;
    }

    .university-detail-content {
        padding-top: 40px;
        padding-bottom: 40px;
    }


    .university-detail-content h2 {
        font-size: 1.5rem;
    }

    .university-detail-content .overflow-x-auto {
        overflow: visible;
    }

    .university-detail-content table,
    .university-detail-content tbody,
    .university-detail-content td {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .university-detail-content tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 12px 0;
        border-bottom: 1px solid #f3f4f6;
    }

    .university-detail-content thead {
        display: none;
    }

    .university-detail-content tr {
        width: 100%;
    }

    .university-detail-content tr:last-child {
        border-bottom: 0;
    }

    .university-detail-content td {
        display: block;
        width: auto;
        padding: 7px 10px;
        border: 0;
    }

    .university-detail-content td:nth-child(n) {
        width: auto;
    }

    .university-detail-content td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: #6b7280;
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .university-detail-content td:first-child {
        display: block;
        grid-column: 1 / -1;
        padding: 10px 16px 8px;
    }

    .university-detail-content td:first-child::before {
        margin-bottom: 4px;
    }
}

.breadcrumb {
    font-size: 0.9rem;
    opacity: 0.85;
}

.breadcrumb a:hover { text-decoration: underline; }

/* WhatsApp float */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 50;
    animation: pulse-whatsapp 2.5s infinite;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover { transform: scale(1.1); }

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
    70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
