/* Custom CSS for SSD Academy */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --academy-blue: #22c55e;
    --academy-dark-blue: #16a34a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header Styles */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: #fff !important;
    padding: 0.75rem 0;
    min-height: 70px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--academy-blue) !important;
    white-space: nowrap;
}

.navbar-nav {
    flex-wrap: wrap;
    align-items: center;
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #333 !important;
    padding: 0.5rem 0.75rem !important;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.95rem;
}

.navbar-nav .nav-link:hover {
    color: var(--academy-blue) !important;
}

.navbar-nav .nav-link.active {
    color: var(--academy-blue) !important;
    font-weight: 600;
}

.navbar-nav .nav-link i {
    font-size: 0.9rem;
}

/* Ensure dropdowns don't overflow */
.navbar-nav .dropdown {
    position: static;
}

@media (min-width: 992px) {
    .navbar-nav .dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
    }
    
    /* Prevent menu items from wrapping on large screens */
    .navbar-nav {
        flex-wrap: nowrap;
    }
}

/* Dropdown Menu Styles */
.dropdown-menu {
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 240px;
    max-width: 300px;
    z-index: 1050;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    color: #333;
    white-space: normal;
    word-wrap: break-word;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--academy-blue);
    padding-left: 1.5rem;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: #e9ecef;
}

.dropdown-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--academy-blue);
    padding: 0.5rem 1.25rem;
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.dropdown-header i {
    font-size: 0.85rem;
}

/* More Dropdown Menu with Scrollbar */
.more-dropdown-menu {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.more-dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.more-dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.more-dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--academy-blue);
    border-radius: 4px;
}

.more-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--academy-dark-blue);
}

/* Firefox scrollbar */
.more-dropdown-menu {
    scrollbar-width: thin;
    scrollbar-color: var(--academy-blue) #f1f1f1;
}

/* Active state for dropdown items */
.dropdown-item.active {
    background-color: #e7f3ff;
    color: var(--academy-blue);
    font-weight: 600;
}

.dropdown-toggle::after {
    margin-left: 0.5rem;
    vertical-align: 0.15em;
    font-size: 0.7rem;
}

/* CTA Buttons in Navbar */
.navbar .d-flex.gap-2 {
    flex-wrap: nowrap;
    margin-left: 1rem;
}

.navbar .btn {
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.navbar .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

/* Mobile Menu Adjustments */
@media (max-width: 1199px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.5rem !important;
        font-size: 0.9rem;
    }
    
    .navbar .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 991px) {
    .navbar-nav {
        margin-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--academy-blue);
        background-color: #f8f9fa;
        border-radius: 0;
        max-width: 100%;
    }
    
    .dropdown-item {
        padding-left: 2.5rem;
        padding-right: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid #e9ecef;
    }
    
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    .navbar .d-flex.gap-2 {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        flex-direction: column;
    }
    
    .navbar .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.85rem;
    }
}

.btn-primary {
    background-color: var(--academy-blue);
    border-color: var(--academy-blue);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--academy-dark-blue);
    border-color: var(--academy-dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-outline-primary {
    border-color: var(--academy-blue);
    color: var(--academy-blue);
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--academy-blue);
    border-color: var(--academy-blue);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--academy-blue) 0%, var(--academy-dark-blue) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Section Styles */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 3rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Statistics */
.stat-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--academy-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Footer */
.footer {
    background-color: #212529;
    color: #fff;
    padding: 60px 0 20px;
}

.footer.bg-dark {
    background-color: #212529 !important;
}

.footer h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #fff;
}

.footer .text-muted {
    color: #adb5bd !important;
}

.footer .text-primary-custom {
    color: var(--academy-blue) !important;
}

.footer-bottom {
    border-top: 1px solid #495057;
    padding-top: 2rem;
    margin-top: 3rem;
    text-align: center;
    color: #adb5bd;
}

.footer .list-unstyled a {
    transition: all 0.3s ease;
}

.footer .list-unstyled a:hover {
    color: #fff;
    padding-left: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Utilities */
.text-primary-custom {
    color: var(--academy-blue) !important;
}

.bg-primary-custom {
    background-color: var(--academy-blue) !important;
}

.shadow-custom {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Spinner */
.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Shared Pagination (Notice, Projects, Gallery) */
.notice-pagination-wrapper,
.project-pagination-wrapper,
.gallery-pagination-wrapper {
    margin-top: 3rem;
}

.notice-pagination-nav {
    max-width: 720px;
    margin: 0 auto;
}

.notice-pagination-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.notice-pagination-info {
    order: 2;
}

.notice-pagination-results {
    font-size: 0.9rem;
    color: #6b7280;
}

.notice-pagination-results strong {
    color: #374151;
    font-weight: 600;
}

.notice-pagination-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-pagination-item {
    margin: 0;
}

.notice-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.875rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

a.notice-pagination-link:hover {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #16a34a;
}

.notice-pagination-item.active .notice-pagination-link {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}

.notice-pagination-item.disabled .notice-pagination-link {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.notice-pagination-ellipsis {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.notice-pagination-link i {
    font-size: 1rem;
}

@media (min-width: 576px) {
    .notice-pagination-inner {
        flex-direction: row;
        justify-content: space-between;
    }
    .notice-pagination-info {
        order: 1;
    }
}

@media (max-width: 575.98px) {
    .notice-pagination-link {
        min-width: 36px;
        height: 36px;
        padding: 0 0.65rem;
        font-size: 0.85rem;
    }
}
