/* ===================================
   Schools Division of Iloilo
   Modern & Clean Design
   =================================== */

/* Root Variables */
:root {
    --primary-color: #0d47a1;
    --primary-light: #1565c0;
    --secondary-color: #f5f5f5;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --border-radius: 0.75rem;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
}

p {
    color: var(--text-muted);
}

/* ===================================
   NAVIGATION BAR
   =================================== */

.navbar {
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.2rem;
}

.navbar-brand small {
    font-weight: 400;
    letter-spacing: 0.5px;
}

.nav-link {
    margin-left: 1.5rem;
    font-weight: 500;
    color: var(--text-dark) !important;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color) !important;
}

/* Systems Modal Button */
.btn-systems {
    background: none;
    border: none;
    margin-left: 1.5rem;
    font-weight: 500;
    color: var(--text-dark) !important;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.btn-systems::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.btn-systems:hover {
    color: var(--primary-color) !important;
}

.btn-systems:hover::after {
    width: 100%;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.9) 0%, rgba(21, 101, 192, 0.85) 100%), 
                url('background-1.jpg') no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: translate(100px, -100px);
    z-index: 0;
}

.hero-section h1 {
    color: white;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0a3a8f;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(13, 71, 161, 0.3);
}

.btn-light {
    background-color: white;
    color: var(--primary-color);
}

.btn-light:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.btn-outline-light {
    color: white;
    border: 2px solid white;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

/* ===================================
   CARDS
   =================================== */

.card {
    border: 1px solid #e8e8e8 !important;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.announcement-card {
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
}

.announcement-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(13, 71, 161, 0.15);
}

/* ===================================
   SECTIONS
   =================================== */

section {
    scroll-margin-top: 80px;
}

section h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

section .lead {
    font-size: 1.15rem;
    line-height: 1.8;
}

/* About Section */
#about {
    background-color: #f9f9f9;
}

/* Announcements Section */
#announcements {
    background-color: #f5f5f5;
}

/* Contact Section */
#contact {
    background-color: #f9f9f9;
}

/* ===================================
   FORM ELEMENTS
   =================================== */

.form-control {
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 71, 161, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* ===================================
   ICON BOX
   =================================== */

.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 0.5rem;
}

.icon-box i {
    font-size: 1.5rem;
}

/* ===================================
   FOOTER
   =================================== */

footer {
    background-color: #1a1a1a;
    margin-top: 3rem;
    border-top: 1px solid #2a2a2a;
}

footer h6 {
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

footer hr {
    border-color: #2a2a2a;
}

/* ===================================
   ANIMATIONS
   =================================== */

.animate__animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.fw-600 {
    font-weight: 600;
}

.w-fit {
    width: fit-content;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-opacity-5 {
    background-color: rgba(255, 255, 255, 0.05);
}

.bg-opacity-10 {
    background-color: rgba(var(--bs-bg-rgb), 0.1);
}

.rounded-2 {
    border-radius: 0.5rem;
}

.rounded-3 {
    border-radius: 0.75rem;
}

.rounded-4 {
    border-radius: 1rem;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.shadow {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .hero-section {
        min-height: 500px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    .nav-link {
        margin-left: 0;
        padding: 0.5rem 0;
    }

    .nav-link::after {
        display: none;
    }

    .btn-systems::after {
        display: none;
    }

    .btn-systems {
        margin-left: 0 !important;
    }

    .display-5 {
        font-size: 1.8rem;
    }

    .d-flex.gap-3 {
        flex-direction: column;
    }

    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .btn-lg {
        width: 100%;
    }

    footer {
        text-align: center;
    }

    footer .text-md-start {
        text-align: center;
    }

    footer .text-md-end {
        text-align: center;
    }

    /* Modal responsive */
    .modal-dialog {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .system-card {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }

    .card-body {
        padding: 1.5rem !important;
    }

    .icon-box {
        width: 40px;
        height: 40px;
    }

    .icon-box i {
        font-size: 1.2rem;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   SYSTEMS MODAL
   =================================== */

.modal-content {
    border: 1px solid #e8e8e8;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 1.5rem;
}

.modal-header .modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.system-card {
    background: #ffffff;
    border: 2px solid #e8e8e8;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: block;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.system-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(13, 71, 161, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, rgba(13, 71, 161, 0.03) 100%);
}

.system-card:hover::before {
    transform: scaleX(1);
}

.system-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, rgba(13, 71, 161, 0.05) 100%);
    box-shadow: 0 15px 40px rgba(13, 71, 161, 0.2);
}

.system-card.selected::before {
    transform: scaleX(1);
}

.system-card h6 {
    color: var(--text-dark);
    font-weight: 700;
    transition: color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.system-card:hover h6,
.system-card.selected h6 {
    color: var(--primary-color);
}

.system-card p {
    transition: color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.system-card:hover .icon-box,
.system-card.selected .icon-box {
    transform: scale(1.15) rotate(5deg);
}

.system-card .icon-box {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.system-card:active {
    transform: translateY(-5px) scale(0.98);
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    background-color: #f9f9f9;
    border-top: 1px solid #e8e8e8;
}

.cursor-pointer {
    cursor: pointer;
}

/* ===================================
   DARK MODE (OPTIONAL)
   =================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #e0e0e0;
        --text-muted: #b0b0b0;
    }

    body {
        background-color: #1a1a1a;
        color: var(--text-dark);
    }

    .card {
        background-color: #2a2a2a;
        border-color: #3a3a3a;
    }

    .form-control {
        background-color: #2a2a2a;
        color: var(--text-dark);
        border-color: #3a3a3a;
    }

    .navbar {
        background-color: #1a1a1a !important;
        border-bottom-color: #3a3a3a;
    }
}