/* ============================================
   DIISRF Main Stylesheet
   Base styles and utilities
   ============================================ */

/* === Base Import === */
/* Note: custom.css is loaded separately in base.html for proper cascade order */
@import url('form-styling.css');

/* === Root Variables === */
:root {
    /* Primary Colors */
    --primary: #23406E;
    --primary-light: #2d5086;
    --primary-lighter: #3a5d8f;
    --primary-dark: #1c3358;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8f9fc;
    --gray-100: #f0f2f7;
    --gray-200: #e3e8f0;
    --gray-300: #d1d7e3;
    --gray-400: #b4bccb;
    --gray-500: #6c757d;
    --gray-600: #545b68;
    --gray-700: #3c424f;
    --gray-800: #2c3e50;
    --gray-900: #1a252f;
    
    /* Semantic Colors */
    --success: #28c76f;
    --info: #00bad1;
    --warning: #ff9f43;
    --danger: #ff4c51;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-round: 50px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(35, 64, 110, 0.06);
    --shadow-md: 0 2px 12px rgba(35, 64, 110, 0.08);
    --shadow-lg: 0 4px 20px rgba(35, 64, 110, 0.12);
    --shadow-xl: 0 8px 30px rgba(35, 64, 110, 0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* === Typography === */
body {
    font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--gray-900);
    margin-bottom: var(--spacing-md);
}

h1, .h1 { font-size: 2.25rem; }
h2, .h2 { font-size: 1.875rem; }
h3, .h3 { font-size: 1.5rem; }
h4, .h4 { font-size: 1.25rem; }
h5, .h5 { font-size: 1.125rem; }
h6, .h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

/* === Utility Classes === */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-info { color: var(--info) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-info { background-color: var(--info) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }

/* === Container Enhancements === */
/* .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
}

@media (max-width: 768px) {
    .container {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
} */

/* === Section Spacing === */
section {
    /* padding: var(--spacing-xl) 0; */
}

section.section-sm {
    padding: var(--spacing-lg) 0;
}

section.section-lg {
    padding: var(--spacing-xxl) 0;
}

/* === Links === */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* === Focus States === */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus,
.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(35, 64, 110, 0.15);
}

/* === Scrollbar Styling === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* === Selection === */
::selection {
    background-color: rgba(35, 64, 110, 0.2);
    color: var(--gray-900);
}

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

/* === Print Styles === */
@media print {
    body {
        background: white;
    }
    
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}

/* === Accessibility === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 1000;
}

.skip-to-content:focus {
    top: 0;
}

/* === Loading State === */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

