/* Reset și stiluri de bază */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Navbar personalizat pentru liceu */
.navbar-custom {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.small-title {
    font-size: 1.2rem; /* mai mic decât implicit */
    text-align: center!important;
}

.navbar-brand .text-center {
    display: flex;
    flex-direction: column;
    justify-content: center; /* aliniere pe centru vertical */
    text-align: center;      /* text centrat orizontal */
    font-size: 1.5rem;
    font-weight: bold!important;
}

.navbar-brand img {
    height: 70px;
    width: auto;
    margin-right: 15px;
}

.oraral-titlu {
    text-align: center;
    margin: 40px 0; /* spațiu sus și jos */
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #fbbf24 !important;
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Eliminare comportament click pentru dropdown-uri - doar hover */
.navbar-nav .dropdown-toggle {
    pointer-events: auto; /* Permite click-ul pentru navigare */
}

/* Săgeți vizuale pentru dropdown-uri cu submeniuri */
.navbar-nav .dropdown-toggle::after {
    content: '\f107'; /* FontAwesome chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    border: none !important;
    vertical-align: middle;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Rotire săgeată la hover pentru dropdown-uri */
.navbar-nav .dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Pentru link-uri simple fără dropdown, nu afișa săgeată */
.navbar-nav .nav-link:not(.dropdown-toggle)::after {
    display: none;
}

/* Dropdown menu stiluri */
.dropdown-menu {
    background-color: #1e40af;
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    margin-top: 0px;
    min-width: 250px;
}

/* Dropdown hover pentru desktop - doar hover, fără click */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover > .dropdown-menu {
        display: block !important;
        animation: fadeInDown 0.3s ease;
    }
    
    /* Previne deschiderea dropdown-ului la click */
    .navbar-nav .dropdown-toggle[data-bs-toggle="dropdown"] {
        pointer-events: auto; /* Permite navigarea la click */
    }
    
    /* Dezactivează Bootstrap dropdown click behavior */
    .navbar-nav .dropdown-toggle[data-bs-toggle="dropdown"]:focus {
        outline: none;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    color: white !important;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.dropdown-item:hover {
    background-color: #1e3a8a;
    color: #fbbf24 !important;
    transform: translateX(5px);
}

/* Submenu / Dropdown multinivel */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    border-radius: 8px;
    background-color: #1e3a8a;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-submenu > .dropdown-item-wrapper {
    display: block;
}

.dropdown-submenu > .dropdown-item::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    float: right;
    margin-left: auto;
    margin-top: 2px;
}

/* Submenu hover effects */
.dropdown-submenu > .dropdown-menu .dropdown-item {
    background-color: transparent;
    color: white !important;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.dropdown-submenu > .dropdown-menu .dropdown-item:hover {
    background-color: #1e40af;
    color: #fbbf24 !important;
    transform: translateX(3px);
}

/* Săgeți mobile - ascunse pe desktop */
.mobile-dropdown-arrow,
.mobile-submenu-arrow {
    display: none;
}

/* Responsive dropdown pentru mobile */
@media (max-width: 991.98px) {
    /* Ascunde săgeata implicită Bootstrap pe mobile */
    .navbar-nav .dropdown-toggle::after {
        display: none !important;
    }
    
    .dropdown-submenu > .dropdown-item::after {
        display: none !important;
    }
    
    /* Afișează săgețile mobile */
    .mobile-dropdown-arrow,
    .mobile-submenu-arrow {
        display: inline-block;
        margin-left: auto;
        padding: 0.25rem 0.5rem;
        transition: transform 0.3s ease;
        cursor: pointer;
        border-radius: 3px;
    }
    
    /* Stilizare pentru link-urile cu săgeți mobile */
    .nav-link.dropdown-toggle,
    .dropdown-item.dropdown-toggle {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }
    
    /* Hover pe săgeată */
    .mobile-dropdown-arrow:hover,
    .mobile-submenu-arrow:hover {
        background-color: rgba(255,255,255,0.2);
    }
    
    /* Rotire săgeată când dropdown este deschis */
    .dropdown.show .mobile-dropdown-arrow i {
        transform: rotate(180deg);
    }
    
    .dropdown-submenu.show .mobile-submenu-arrow i {
        transform: rotate(180deg);
    }
    
    /* Submeniuri pe mobile */
    .dropdown-submenu > .dropdown-menu {
        position: static;
        float: none;
        left: auto;
        top: auto;
        margin-top: 0;
        box-shadow: none;
        background-color: #1e3a8a;
        border-left: 3px solid #fbbf24;
        margin-left: 1rem;
        display: none;
    }
    
    /* Dezactivează hover pe mobile */
    .dropdown-submenu:hover > .dropdown-menu {
        display: none;
    }
    
    /* Afișează submeniul când are clasa 'show' */
    .dropdown-submenu.show > .dropdown-menu {
        display: block !important;
    }
    
    /* Pe mobile, dropdown-ul cu click funcționează normal */
    .navbar-nav .dropdown-toggle[data-bs-toggle="dropdown"] {
        pointer-events: auto;
    }
}

/* Search button */
.search-btn {
    background: none;
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.search-btn:hover {
    background-color: white;
    color: #1e3a8a;
    transform: scale(1.05);
}


/* Footer */
footer {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    color: white;
    padding: 3rem 0 2rem;
}

footer h5 {
    color: #fbbf24;
    margin-bottom: 1rem;
}

footer a {
    color: #e5e7eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fbbf24;
}

.social-links a {
    font-size: 1.5rem;
    margin: 0 10px;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* Submenu cards styling */
.submenu-cards .card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.submenu-cards .card:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.submenu-cards .card:hover .card-body {
    color: white;
}

.submenu-cards .card:hover .card-title {
    color: #fbbf24;
}

.submenu-cards .card:hover .fa {
    color: #fbbf24;
}

/* Responsive design */

/* Media query pentru ecrane medii (între 992px și 1400px) */
@media (min-width: 1200px) and (max-width: 1400px) {
    /* Micșorează font-size pentru meniuri */
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        margin: 0 0.3rem; /* Reduce spațiul între meniuri */
        padding: 0.4rem 0.8rem !important; /* Reduce padding-ul */
    }
    
    /* Micșorează font-size pentru dropdown items */
    .dropdown-item {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
    
    /* Micșorează dropdown menu */
    .dropdown-menu {
        min-width: 220px;
    }
    
    /* Micșorează submenu items */
    .dropdown-submenu > .dropdown-menu .dropdown-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
    }
    
    /* Micșorează săgețile */
    .navbar-nav .dropdown-toggle::after {
        font-size: 0.7rem;
        margin-left: 0.3rem;
    }
    
    .dropdown-submenu > .dropdown-item::after {
        font-size: 0.7rem;
    }
    
    /* Micșorează logo-ul */
    .navbar-brand img {
        height: 60px;
    }
    
    .navbar-brand .fw-bold {
        font-size: 1rem;
    }
    
    .navbar-brand div[style*="font-size"] {
        font-size: 1.1rem !important;
    }
    
    /* Micșorează butonul de search */
    .search-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Media query pentru ecrane medii (între 992px și 1400px) */
@media (min-width: 992px) and (max-width: 1200px) {
    /* Micșorează font-size pentru meniuri */
    .navbar-nav .nav-link {
        font-size: 0.7rem;
        margin: 0 0.2rem; /* Reduce spațiul între meniuri */
        padding: 0.4rem 0.8rem !important; /* Reduce padding-ul */
    }
    
    /* Micșorează font-size pentru dropdown items */
    .dropdown-item {
        font-size: 0.7rem;
        padding: 0.6rem 1.2rem;
    }
    
    /* Micșorează dropdown menu */
    .dropdown-menu {
        min-width: 200px;
    }
    
    /* Micșorează submenu items */
    .dropdown-submenu > .dropdown-menu .dropdown-item {
        font-size: 0.7rem;
        padding: 0.4rem 0.9rem;
    }
    
    /* Micșorează săgețile */
    .navbar-nav .dropdown-toggle::after {
        font-size: 0.6rem;
        margin-left: 0.3rem;
    }
    
    .dropdown-submenu > .dropdown-item::after {
        font-size: 0.6rem;
    }
    
    /* Micșorează logo-ul */
    .navbar-brand img {
        height: 50px;
    }
    
    .navbar-brand .fw-bold {
        font-size: 0.9rem;
    }
    
    .navbar-brand div[style*="font-size"] {
        font-size: 1rem !important;
    }
    
    /* Micșorează butonul de search */
    .search-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {

    .navbar-brand img {
        height: 40px;
    }
    
    .hero-section {
        height: 60vh;
    }
    
    .hero-section-page {
        height: 40vh;
    }
    
    .dropdown-menu {
        min-width: 200px;
    }
}

@media (max-width: 576px) {

    
    .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .dropdown-menu {
        min-width: 180px;
    }
}
