@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Poppins:wght@300;400;600;700&family=Open+Sans:wght@300;400;600&display=swap');

:root {
    /* Colors */
    --primary: #003366;
    --primary-light: #004080;
    --secondary: #FF9933;
    --bg-light: #F8F9FA;
    --accent: #138808;
    --accent-orange: #FF8C00;
    --text-dark: #001A33;
    --text-muted: rgba(0, 26, 51, 0.7);
    --white: #ffffff;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Transitions */
    --transition: all 0.3s ease-in-out;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.8;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
}

a {
    text-decoration: none;
    transition: var(--transition);
}

/* Navbar - Always Visible */
nav.navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 5%;
    z-index: 2500 !important;
    transition: var(--transition);
    background: rgba(0, 51, 102, 0.95);
    box-shadow: var(--shadow);
}

nav.navbar.scrolled {
    background: var(--white);
    padding: 10px 5%;
}

nav.navbar.scrolled .logo,
nav.navbar.scrolled .nav-links a {
    color: var(--primary);
}

nav.navbar .logo,
nav.navbar .nav-links a {
    color: var(--secondary);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--secondary) !important;
}

nav.navbar.scrolled .nav-links a:hover {
    color: var(--accent) !important;
}

/* Luxury Dropdown Menu */
.dropdown-menu {
    background: #FFFAF0 !important;
    border: 1px solid #FF9933 !important;
    padding: 15px 0 !important;
    margin-top: 15px !important;
    border-radius: 4px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-item {
    color: var(--primary) !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 30px !important;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--primary) !important;
    color: var(--secondary) !important;
    padding-left: 35px !important;
}

.nav-links .dropdown-toggle::after {
    border-top: 0.3em solid var(--secondary);
    vertical-align: 0.255em;
    margin-left: 8px;
}

nav.navbar.scrolled .dropdown-toggle::after {
    border-top-color: var(--primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 51, 102, 0.6), rgba(0, 51, 102, 0.6)), url('./assets/images/man_bg.jpg') no-repeat center center/cover;
    color: var(--white);
    padding: 0 10%;
}

.hero h1 {
    color: var(--secondary);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Sections */
section {
    padding: 100px 10%;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
}

/* Components */
.btn-mangrove {
    padding: 12px 30px;
    background: var(--accent);
    color: var(--primary);
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 50px;
}

.btn-mangrove:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Ultra-Premium Luxurious Scientific Tables */
.chart-container {
    background: linear-gradient(135deg, #fcfbf9 0%, #ffffff 100%);
    padding: 50px;
    border-radius: 2px;
    border: 3px double rgba(0, 51, 102, 0.2);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    margin: 60px 0;
    position: relative;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #E68A00, transparent);
}

.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 0;
    background: linear-gradient(to bottom, #ffffff 0%, #fdfcf8 100%);
    border: 2px solid #FF9933;
    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, #001A33 0%, #003366 50%, #004080 100%);
    color: #FF9933;
    font-family: 'Playfair Display', serif;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.8rem;
    border-bottom: 5px solid #FF9933;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 3px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.table thead::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(230, 138, 0, 0.5), transparent);
}

.table th {
    padding: 28px 30px !important;
    border-right: 1px solid rgba(255, 153, 51, 0.2) !important;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
}

.table th:last-child {
    border-right: none !important;
}

.table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 153, 51, 0.4), transparent);
}

.table tbody tr {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(230, 138, 0, 0.15);
}

.table tbody tr:nth-child(even) {
    background: linear-gradient(to right, #faf8f3 0%, #fcfbf9 100%);
}

.table tbody tr:nth-child(odd) {
    background: linear-gradient(to right, #ffffff 0%, #fefefe 100%);
}

.table td {
    padding: 22px 30px !important;
    vertical-align: middle;
    color: #001A33;
    border-right: 1px solid rgba(230, 138, 0, 0.08) !important;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.table td:last-child {
    border-right: none !important;
}

.table td:first-child {
    font-weight: 700;
    color: #003366;
    background: linear-gradient(to right, rgba(255, 153, 51, 0.08), transparent);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
}

.table td:nth-child(2),
.table td:nth-child(3),
.table td:nth-child(4),
.table td:nth-child(5) {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    color: #003366;
    font-size: 1.15rem;
    text-align: center;
    background: linear-gradient(to bottom, rgba(0, 51, 102, 0.02), transparent);
}

.table tbody tr:hover {
    background: linear-gradient(135deg, #f5f0e8 0%, #faf7f0 100%) !important;
    transform: translateY(-3px) scale(1.008);
    box-shadow:
        0 15px 40px rgba(0, 51, 102, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(255, 153, 51, 0.3);
    z-index: 10;
    position: relative;
}

.table tbody tr:hover td {
    color: #001A33;
    border-color: rgba(230, 138, 0, 0.2) !important;
}

.table tbody tr:hover td:first-child {
    background: linear-gradient(to right, rgba(255, 153, 51, 0.2), transparent);
}

.table-success {
    background: linear-gradient(135deg, #e8dcc4 0%, #f0e5d0 100%) !important;
    font-weight: 900 !important;
    border-top: 2px solid #FF9933 !important;
    border-bottom: 2px solid #FF9933 !important;
    box-shadow: inset 0 2px 8px rgba(230, 138, 0, 0.15);
}

.table-success td {
    color: #001A33 !important;
    font-weight: 900 !important;
    text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.5);
}

/* Modal Z-Index Hierarchy Fix */
.modal {
    z-index: 5000 !important;
}

.modal-backdrop {
    z-index: 4999 !important;
}

.modal-content {
    border-radius: 0 !important;
    border-top: 5px solid var(--primary) !important;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    background: var(--primary);
    color: var(--secondary);
    padding: 60px 10% 20px;
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 40px;
    font-size: 0.8rem;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 3000;
    box-shadow: var(--shadow);
    border: none;
    outline: none;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background: var(--accent);
    transform: translateY(-5px);
}

/* ========================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATION
   ======================================== */

/* Tablet & Mobile Navigation (991px for Bootstrap's lg breakpoint) */
@media (max-width: 991px) {
    nav.navbar {
        padding: 10px 5% !important;
    }

    .navbar-toggler {
        border-color: rgba(255, 153, 51, 0.5) !important;
        padding: 4px 8px !important;
    }

    .navbar-toggler:focus {
        box-shadow: none !important;
    }

    /* Custom Toggler Icon Color */
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 153, 51, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    nav.navbar.scrolled .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 51, 102, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    nav.navbar.scrolled .navbar-toggler {
        border-color: rgba(0, 51, 102, 0.2) !important;
    }

    .navbar-collapse {
        background: rgba(0, 51, 102, 0.98);
        margin: 15px -15px 0;
        padding: 20px;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    nav.navbar.scrolled .navbar-collapse {
        background: #ffffff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .nav-links li {
        margin: 12px 0 !important;
        margin-left: 0 !important;
        width: 100%;
        text-align: center;
    }

    .dropdown-menu {
        text-align: center;
        border: none !important;
        background: rgba(255, 250, 240, 0.1) !important;
        box-shadow: none !important;
    }

    nav.navbar.scrolled .dropdown-menu {
        background: #fdfcf8 !important;
    }

    .dropdown-item {
        color: var(--secondary) !important;
        padding: 10px !important;
    }

    nav.navbar.scrolled .dropdown-item {
        color: var(--primary) !important;
    }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
    section {
        padding: 60px 5%;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .chart-container {
        padding: 20px;
        overflow-x: auto;
        margin: 30px 0;
    }

    .table {
        min-width: 700px;
    }

    .table th,
    .table td {
        padding: 15px 20px !important;
    }

    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Small Phones (480px and below) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    section {
        padding: 40px 5%;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-links li {
        margin: 8px 0 !important;
    }
}