/* ========== Global Design Tokens & Typography ========== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #4a00e0, #8e2de2);
    --accent-gradient: linear-gradient(135deg, #ff416c, #ff4b2b);
    --success-gradient: linear-gradient(135deg, #11998e, #38ef7d);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
}

body, html {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    color: #2c3e50;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Mobile-Friendly Container */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

/* ========== Navbar Modernization & Mobile Optimization ========== */
.navbar {
    background: linear-gradient(90deg, #0637B3 0%, #3B1FC8 50%, #7B0099 100%);
    min-height: 70px;
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.navbar-logo {
    height: 60px;
    max-height: 70px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 10px 16px !important;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffd700 !important;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-toggler {
    border: none;
    padding: 8px;
    color: #fff;
    outline: none !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* ========== Touch-Friendly Buttons ========== */
.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.btn-lg {
    min-height: 50px;
    padding: 12px 28px;
    font-size: 1.05rem;
}

.btn-gradient {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    border: none;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #6610f2, #0d6efd);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.35);
}

.btn-logout {
    background: linear-gradient(135deg, #dc3545, #b02a37);
    border: none;
    color: #fff !important;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #b02a37, #dc3545);
    transform: translateY(-2px);
}

/* ========== Mobile Table Optimization ========== */
.table-responsive {
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
}

.table {
    vertical-align: middle;
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 12px 16px;
}

.table td {
    padding: 14px 16px;
}

/* ========== Modern Card Design ========== */
.card {
    border-radius: var(--border-radius);
    border: 1px solid #eef2f6;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    box-shadow: var(--card-hover-shadow);
}

/* ========== Hero Section ========== */
.hero {
    width: 100%;
    margin-top: 4px;
}

.hero img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== Contact Section ========== */
.contact {
    background: #f8f9fb;
}

.contact h2 {
    font-weight: 700;
}

.contact .contact-form .form-control {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    padding: 12px 16px;
    font-size: 0.95rem;
}

.contact .contact-form .form-control:focus {
    border-color: #6610f2;
    box-shadow: 0 0 0 3px rgba(102, 16, 242, 0.15);
}

.contact .contact-info {
    padding: 20px 0 0 0;
}

.contact .contact-info p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #495057;
}

/* ========== Footer ========== */
footer {
    background: #1a1e21;
    color: rgba(255, 255, 255, 0.7);
    padding: 25px 0;
    font-size: 0.9rem;
    margin-top: 0;
}

/* ========== Mobile Specific Rules (Under 768px) ========== */
@media (max-width: 767.98px) {
    body {
        font-size: 15px;
    }

    h1, .h1 { font-size: 1.85rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.3rem; }

    .hero img {
        max-height: 320px;
    }

    .navbar-logo {
        height: 48px;
    }

    .card {
        margin-bottom: 1rem;
    }

    /* Full-width buttons on mobile */
    .btn-mobile-block {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .contact .contact-info {
        padding: 20px 0 0 0;
        text-align: center;
    }

    /* Mobile Nav Menu - compact right-aligned dropdown */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 10px;
        width: auto;
        min-width: 180px;
        max-width: 220px;
        background: linear-gradient(135deg, #0a2d7a 0%, #3B1FC8 60%, #7B0099 100%);
        padding: 10px;
        border-radius: 12px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
        z-index: 1050;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-collapse::before {
        content: '';
        position: absolute;
        top: -6px;
        right: 18px;
        width: 12px;
        height: 12px;
        background: linear-gradient(135deg, #0a2d7a 0%, #3B1FC8 60%, #7B0099 100%);
        transform: rotate(45deg);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar {
        position: relative;
    }

    .navbar-nav {
        gap: 2px;
    }

    .navbar-nav .nav-item {
        border-radius: 8px;
        overflow: hidden;
    }

    .navbar-nav .nav-link {
        padding: 10px 16px !important;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 500;
        text-align: left;
        transition: all 0.2s ease;
        white-space: nowrap;
    }

    .navbar-nav .nav-link:active {
        background: rgba(255, 255, 255, 0.15);
    }

    .navbar-nav .nav-link.active {
        background: rgba(255, 255, 255, 0.12);
    }

    .navbar-nav .btn-gradient {
        margin-top: 4px;
        width: 100%;
        justify-content: center;
        border-radius: 8px;
        padding: 10px 16px !important;
        font-size: 0.9rem;
    }
}
