/* Global Styles */
:root {
    --primary-color: #003d7a;
    --secondary-color: #0056b3;
    --accent-color: #ff6b35;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --font-body: 'Source Sans 3', 'Trebuchet MS', sans-serif;
    --font-heading: 'Lexend', 'Trebuchet MS', sans-serif;
}

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

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: 0.01em;
}

.sidebar-nav .nav-link,
.btn,
.accordion-button {
    font-family: var(--font-heading);
}

/* Navigation */
.navbar {
    box-shadow: none;
    background: transparent !important;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
    font-weight: 800;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.with-sidebar .sidebar-nav {
    position: fixed;
    top: 36px;
    left: 16px;
    width: 300px;
    height: auto;
    max-height: none;
    z-index: 2000;
    padding: 0;
    border-right: none;
    box-shadow: none;
    overflow: visible;
}

.with-sidebar .page-content {
    margin-left: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.with-sidebar main {
    flex: 1;
}

@media (min-width: 769px) {
    .with-sidebar.is-inner .page-content > main > section.bg-primary:first-child {
        padding-top: 6.5rem !important;
    }

    .with-sidebar.is-inner .page-content > main > section.bg-primary:first-child .container {
        text-align: center;
    }

    .with-sidebar.is-inner .page-content > main > section.bg-primary:first-child .lead {
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }
}

.sidebar-nav .navbar-brand {
    margin-bottom: 0.5rem;
}

.sidebar-nav .container-fluid {
    padding: 0 !important;
    height: auto;
}

.sidebar-nav .navbar-collapse {
    display: block !important;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    height: auto;
}

.with-sidebar.nav-solid .sidebar-nav .navbar-collapse {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.sidebar-nav .navbar-nav {
    height: auto;
    justify-content: flex-start;
    gap: 0 !important;
}

.sidebar-nav .navbar-nav .nav-item + .nav-item {
    margin-top: 2.5mm !important;
}

.sidebar-nav .navbar-toggler {
    display: none !important;
}

.sidebar-nav .nav-link {
    padding: 1.15rem 1.2rem;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.45;
    position: relative;
    overflow: hidden;
    background: rgba(7, 15, 28, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background-clip: padding-box;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.25s ease, color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.with-sidebar.nav-solid .sidebar-nav .nav-link {
    background: rgba(11, 25, 44, 0.72);
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-nav .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    width: 4px;
    height: 80%;
    border-radius: 0 6px 6px 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(89, 183, 255, 0.9));
    opacity: 0.55;
    pointer-events: none;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateX(2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18);
}

.sidebar-nav .nav-link:hover::before,
.sidebar-nav .nav-link.active::before {
    opacity: 1;
}

/* Hero Section */
.hero-section {
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
}

.hero-section > div {
    position: relative;
    z-index: 2;
    max-width: 860px;
    padding: 0 1rem;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.hero-section h1 {
    color: #f9fcff !important;
    text-shadow: 3px 3px 15px rgba(0, 0, 0, 0.7);
    animation: slideDown 0.8s ease-out;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero-section p {
    color: rgba(245, 250, 255, 0.96) !important;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.65);
    animation: slideUp 0.8s ease-out 0.2s backwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards */
.card {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 25px 50px rgba(0, 61, 122, 0.25) !important;
}

.card .card-body {
    position: relative;
    z-index: 2;
}

.card .card-title {
    color: var(--primary-color);
    font-weight: 700;
    transition: color 0.3s ease;
}

.card:hover .card-title {
    color: var(--accent-color);
}

.portfolio-card {
    overflow: hidden;
}

.portfolio-card img {
    transition: transform 0.5s ease;
    height: 250px;
    object-fit: cover;
    filter: brightness(0.9);
}

.portfolio-card:hover img {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 61, 122, 0.3);
}

.btn-outline-light {
    border: 2px solid white;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Sections */
section {
    scroll-margin-top: 70px;
}

.bg-primary {
    background: linear-gradient(135deg, #0f4a83 0%, #1f5f99 55%, #2a6fa8 100%) !important;
    position: relative;
}

.bg-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 22% 42%, rgba(255, 255, 255, 0.1) 0%, transparent 52%),
        radial-gradient(circle at 78% 82%, rgba(255, 255, 255, 0.08) 0%, transparent 48%);
    pointer-events: none;
}

.bg-dark {
    background: linear-gradient(180deg, #1a1f2e 0%, #0d1117 100%) !important;
}

.bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* Links */
a {
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Footer */
footer {
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
    animation: slide 20s linear infinite;
}

@keyframes slide {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(50px);
    }
}

footer a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    body.with-sidebar {
        overflow-x: hidden;
        background: transparent;
    }

    .with-sidebar .sidebar-nav {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        max-width: none;
        padding: 10px 10px 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        z-index: 2000;
    }

    .with-sidebar.is-home .sidebar-nav {
        position: absolute;
    }

    .with-sidebar.is-inner .sidebar-nav {
        background: #1f5f99 !important;
        padding: 10px 10px 0;
    }

    .with-sidebar.is-inner .page-content > main > section.bg-primary:first-child {
        margin-top: 0;
        background: #1f5f99 !important;
    }

    .with-sidebar.is-inner .page-content > main > section.bg-primary:first-child::before {
        display: none;
    }

    .sidebar-nav .container-fluid {
        height: auto;
        padding: 0 !important;
        align-items: stretch;
    }

    .sidebar-nav .navbar-toggler {
        display: none !important;
    }

    .sidebar-nav .navbar-collapse {
        display: block !important;
        width: 100%;
        flex: 1;
        margin: 0;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
        z-index: 2200;
    }

    .sidebar-nav .navbar-collapse.show {
        display: block !important;
    }

    .sidebar-nav .navbar-nav {
        width: 100%;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 0.45rem !important;
        overflow: visible;
        padding-bottom: 0;
        scrollbar-width: auto;
    }

    .sidebar-nav .nav-item {
        width: 100%;
        flex: 0 0 auto;
    }

    .sidebar-nav .nav-link {
        width: 100%;
        display: flex;
        align-items: center;
        white-space: normal;
        background: rgba(245, 248, 252, 0.85);
        border: 1px solid rgba(214, 225, 236, 0.9);
        color: #0a2f55 !important;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    }

    .with-sidebar.is-inner .sidebar-nav .nav-link {
        background: rgba(244, 249, 255, 0.9);
        border: 1px solid rgba(206, 222, 238, 0.92);
        color: #0b365f !important;
    }

    .sidebar-nav .navbar-nav .nav-item + .nav-item {
        margin-top: 0 !important;
    }

    .sidebar-nav .nav-link {
        font-size: 1.06rem;
        padding: 0.78rem 0.95rem;
        border-radius: 11px;
        font-weight: 700;
        line-height: 1.3;
    }

    .with-sidebar.nav-solid .sidebar-nav .nav-link {
        background: rgba(245, 248, 252, 0.85);
        color: #0a2f55;
    }

    .with-sidebar .page-content {
        display: block;
        margin-left: 0;
        padding-top: 0;
    }

    .sidebar-nav .nav-link::before {
        display: none;
    }

    .sidebar-nav .nav-link:hover,
    .sidebar-nav .nav-link.active {
        transform: none;
        background: rgba(255, 255, 255, 0.95);
        color: #003d7a;
        border-color: rgba(159, 192, 223, 0.95);
        box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
    }

    .sidebar-nav .nav-link.active {
        background: rgba(230, 240, 250, 0.95);
        color: #003d7a;
    }

    .with-sidebar.is-inner .sidebar-nav .nav-link:hover,
    .with-sidebar.is-inner .sidebar-nav .nav-link.active {
        background: #ffffff;
        color: #0b365f;
        border-color: rgba(184, 208, 231, 0.95);
    }

    .hero-section {
        background-attachment: scroll;
        align-items: flex-end !important;
    }

    .hero-section {
        height: 400px;
    }

    .hero-section > div {
        margin-bottom: 48px;
        padding: 0 0.9rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-3 {
        font-size: 1.8rem;
    }

    .card {
        margin-bottom: 1rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Form Styles */
.form-control,
.form-select {
    border-color: #ddd;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 61, 122, 0.25);
}

/* List Styles */
.list-unstyled li {
    padding: 8px 0;
}

/* Text Styles */
.lead {
    font-size: 1.3rem;
    font-weight: 300;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: inherit;
}

/* Spacing Utilities */
.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Shadows */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Accordion */
.accordion-button {
    font-weight: 700;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: none;
}

.accordion-item {
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
}
