/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #2E7D8A;
    --primary-light: #4A9BA8;
    --primary-dark: #1E5A65;
    --secondary-color: #F8F9FA;
    --accent-color: #E8F4F6;
    --text-primary: #2C3E50;
    --text-secondary: #5A6C7D;
    --text-muted: #8B9DC3;
    --border-color: #E1E8ED;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --danger-color: #E74C3C;
    --white: #FFFFFF;
    --light-gray: #F7F9FC;
    --shadow-light: 0 2px 8px rgba(46, 125, 138, 0.08);
    --shadow-medium: 0 4px 16px rgba(46, 125, 138, 0.12);
    --shadow-heavy: 0 8px 32px rgba(46, 125, 138, 0.16);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--white);
    font-size: 16px;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
    margin: 10px 0px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: #0f0f0f;
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* ===== UTILITY CLASSES ===== */
.text-primary-custom { color: var(--primary-color) !important; }
.bg-primary-custom { background-color: var(--primary-color) !important; }
.bg-light-custom { background-color: var(--light-gray) !important; }
.border-primary-custom { border-color: var(--primary-color) !important; }

.section-padding {
    padding: 3rem 0;
}

.section-padding-sm {
    padding: 2rem 0;
}

.compact-spacing {
    margin-bottom: 1.5rem;
}

.no-margin { margin: 0 !important; }
.no-padding { padding: 0 !important; }

/* ===== HEADER STYLES ===== */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-light);
    padding: 0.75rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-medium);
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: #485d9d;
    color: #ffffff !important;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/sri-lanka-pattern.png') repeat;
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta {
    margin-top: 2rem;
}

/* ===== BUTTON STYLES ===== */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    transition: var(--transition);
    text-transform: none;
    font-size: 0.95rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ===== CARD STYLES ===== */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--light-gray);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
}


.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ===== FEATURE CARDS ===== */
.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    height: 100%;
    border: none;
    background: var(--white);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    padding: 3rem 0;
}

.content-section:nth-child(even) {
    background-color: var(--light-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* ===== NAVIGATION STYLES ===== */
.page-nav {
    background-color: var(--accent-color);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

/* ===== TABLE STYLES ===== */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: var(--light-gray);
    border-top: none;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    padding: 1rem 0.75rem;
}

.table td {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--light-gray);
}

/* ===== ALERT STYLES ===== */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-info {
    background-color: #E8F4F6;
    color: var(--primary-dark);
    border-left: 4px solid var(--primary-color);
}

.alert-warning {
    background-color: #FEF9E7;
    color: #B7791F;
    border-left: 4px solid var(--warning-color);
}

.alert-success {
    background-color: #E8F5E8;
    color: #1E7E34;
    border-left: 4px solid var(--success-color);
}

/* ===== LIST STYLES ===== */
.list-unstyled li {
    margin-bottom: 0.5rem;
}

.list-check li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
}

.list-check li::before {
    content: '\f00c';
    font-family: 'FontAwesome';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--success-color);
    font-weight: 900;
}

/* ===== FOOTER STYLES ===== */
.footer {
    background-color: var(--text-primary);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer h5 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-padding {
        padding: 2rem 0;
    }
    
    .feature-card {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0 1.5rem;
    }
    
    .section-padding {
        padding: 1.5rem 0;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 0.875rem;
    }
    
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ===== ANIMATION CLASSES ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .footer,
    .btn,
    .hero-section {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

