/* Global Styles */
:root {
    /* Primary Colors */
    --primary-color: #1E3A8A; /* Deep Blue */
    --accent-color: #06B6D4; /* Electric Cyan */
    --text-color: #111827; /* Neutral Dark */
    
    /* Secondary Colors */
    --secondary-color: #8B5CF6; /* Soft Purple */
    --gray-color: #6B7280; /* Warm Gray */
    --light-color: #F3F4F6; /* Light Gray */
    
    /* Functional Colors */
    --success-color: #10B981; /* Success Green */
    --warning-color: #F59E0B; /* Warning Amber */
    --error-color: #EF4444; /* Error Red */
    
    /* Additional UI Colors */
    --dark-color: #111827; /* Same as text-color for consistency */
    --white-color: #FFFFFF;
    
    /* Spacing System */
    --spacing-1: 0.25rem;  /* 4px */
    --spacing-2: 0.5rem;   /* 8px */
    --spacing-3: 1rem;     /* 16px */
    --spacing-4: 1.5rem;   /* 24px */
    --spacing-5: 2rem;     /* 32px */
    --spacing-6: 3rem;     /* 48px */
    --spacing-7: 4rem;     /* 64px */
    --spacing-8: 6rem;     /* 96px */
    
    /* Shadow System */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Animation System */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 0.25rem;  /* 4px */
    --radius-md: 0.375rem; /* 6px */
    --radius-lg: 0.5rem;   /* 8px */
    --radius-xl: 1rem;     /* 16px */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
    background-color: var(--white-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.25rem;
    font-weight: 700;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
}

h4 {
    font-size: 1.5rem;
    font-weight: 600;
}

h5 {
    font-size: 1.25rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

.text-small {
    font-size: 0.875rem;
}

.text-xsmall {
    font-size: 0.75rem;
}

.text-emphasis {
    font-weight: 500;
}

code, pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #152C6B; /* Darker shade of primary */
    border-color: #152C6B;
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white-color);
}

.btn-accent:hover {
    background-color: #0591A8; /* Darker shade of accent */
    border-color: #0591A8;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white-color);
}

.btn-secondary:hover {
    background-color: #7349D3; /* Darker shade of secondary */
    border-color: #7349D3;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-outline-accent {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

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

/* Header Styles - Flexible and zoom-friendly */
.site-header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--dark-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

/* Navbar container with flexible spacing - prevent wrapping at all zoom levels */
.site-header .navbar {
    padding: 0.5rem 0;
}

.site-header .navbar .container {
    display: flex;
    flex-wrap: nowrap !important; /* Critical: prevent wrapping to two lines */
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

/* Navbar toggler (mobile hamburger menu) - Bootstrap default, styled here for consistency */
.navbar-toggler {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.25rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25);
    border-color: var(--accent-color);
}

/* Navbar collapse with flexible layout */
.navbar-collapse {
    flex-grow: 1;
    align-items: center;
}

/* Navbar nav items with flexible spacing - no wrapping */
.navbar-nav {
    display: flex;
    flex-wrap: nowrap; /* Prevent nav items from wrapping */
    align-items: center;
    gap: 0.125rem;
}

/* Override Bootstrap navbar-brand default styles - Flexible and zoom-friendly */
.navbar-brand {
    font-family: 'Playfair Display', 'Inter', serif !important;
    font-weight: 700 !important;
    font-size: clamp(1.125rem, 2.5vw, 1.5rem) !important; /* More conservative sizing */
    letter-spacing: 0.04em !important; /* Tighter letter spacing to save space */
    color: #FFFFFF !important; 
    text-shadow: 0 2px 8px rgba(0,0,0,0.6) !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0.375rem 0 !important;
    flex-shrink: 0; /* Never shrink the brand name */
    white-space: nowrap; /* Keep on one line */
    min-width: fit-content; /* Ensure it takes only needed space */
}

.navbar-brand:hover,
.navbar-brand:focus {
    transform: translateY(-2px) scale(1.01) !important; /* Less dramatic scale */
    text-shadow: 0 4px 18px rgba(0,0,0,0.8) !important;
    color: #06B6D4 !important; 
    text-decoration: none !important;
}

/* Responsive brand sizing for better zoom compatibility */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-brand {
        font-size: clamp(1rem, 2.25vw, 1.3rem) !important;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .navbar-brand {
        font-size: clamp(1.125rem, 2.5vw, 1.4rem) !important;
    }
}

@media (min-width: 1400px) {
    .navbar-brand {
        font-size: clamp(1.25rem, 2.75vw, 1.5rem) !important;
    }
}

/* Footer brand smaller size */
footer .brand-name {
    font-family: 'Playfair Display', 'Inter', serif !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    letter-spacing: 0.5px !important;
    color: var(--white-color) !important;
    text-shadow: none !important;
    line-height: 1.2 !important;
}

.navbar-brand img {
    max-height: 40px;
}

/* Navigation Items Styling - SEPARATE from brand - Flexible and zoom-friendly */
.navbar-dark .navbar-nav .nav-link {
    font-family: 'Inter', sans-serif !important; /* Different from brand */
    color: var(--white-color) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important; /* Slightly smaller for space efficiency */
    padding: 0.5rem 0.625rem !important; /* Tighter padding to fit more items */
    letter-spacing: normal !important;
    text-shadow: none !important;
    transition: color 0.3s ease, background-color 0.3s ease !important;
    white-space: nowrap;
    border-radius: 0.25rem;
    flex-shrink: 0; /* Prevent nav links from shrinking */
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
    font-weight: 500 !important; /* Keep same weight on hover/active */
    transform: none !important; /* No transform effects for nav items */
    background-color: rgba(6, 182, 212, 0.1) !important; /* Subtle hover background */
}

/* Responsive adjustments for nav links */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-dark .navbar-nav .nav-link {
        font-size: 0.8125rem !important; /* Even smaller on medium screens */
        padding: 0.5rem 0.5rem !important;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .navbar-dark .navbar-nav .nav-link {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.75rem !important;
    }
}

@media (min-width: 1400px) {
    .navbar-dark .navbar-nav .nav-link {
        font-size: 0.9375rem !important;
        padding: 0.5rem 0.875rem !important;
    }
}

/* Mobile nav link styling */
@media (max-width: 991.98px) {
    .navbar-dark .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
        border-radius: 0.375rem;
    }
    
    .navbar-nav {
        width: 100%;
        gap: 0.25rem;
    }
}

/* Hero Section */
.hero {
    background-size: cover;
    background-position: center;
    color: var(--white-color);
    padding: 100px 0;
    position: relative;
    text-align: center;
    /* Default background - can be overridden via inline styles */
    background: linear-gradient(rgba(30, 58, 138, 0.7), rgba(139, 92, 246, 0.6));
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.hero-buttons .btn {
    margin: 0.5rem;
}

/* CTA Section */
.cta-section {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white-color);
}

footer h5 {
    color: var(--white-color);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

footer a {
    color: var(--white-color);
    text-decoration: none;
}

footer a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.social-icons a {
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-color);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Utility Classes */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

.bg-dark {
    background-color: var(--dark-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-error {
    color: var(--error-color) !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}