/*
Theme Name: Academy Theme
Theme URI: https://example.com
Author: Алексей
Description: Custom theme for Academy
Version: 1.1
*/

/* ================================
   VARIABLES
   ================================ */
:root {
    --royal-green: #0D2B24;
    --royal-green-dark: #071a15;
    --bg-dark: #051310;

    --gold-main: #d4af37;
    --gold-light: #f4d076;
    --gold-dark: #aa771c;

    --muted: #b0b0b0;

    --container-max: 1140px;
}

/* ================================
   RESET / BASE
   ================================ */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: 'Montserrat', sans-serif; background: #f4f6f9; color: #111; }
a { color: var(--gold-main); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ================================
   UTILITIES / SMALL COMPONENTS
   ================================ */
.useful-link-title {
    border: 1px solid rgba(212, 175, 55, 0.14);
    padding: 18px;
    transition: .3s;
    background: transparent;
    color: white !important;
}

.useful-link-title:hover {
    background: rgba(212, 175, 55, 0.07);
    border-color: var(--gold-main);
}

.card-icon-wrapper {
    font-size: 2.5rem;
    color: var(--gold-main);
    margin-bottom: 1rem;
}

/* ================================
   HEADER / TOP BAR
   ================================ */
.main-header {
    background: linear-gradient(to bottom, rgba(13, 43, 36, 0.95), rgba(7, 26, 21, 1));
    padding: 15px 0;
    border-bottom: 2px solid rgba(212, 175, 55, 0.18);
    position: relative;
    z-index: 1030;
}

.header-logo-text { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.4rem; text-transform: uppercase; color: #fff; }
.text-gold-gradient {
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.center-logo-img { max-height: 100px; margin: 0 auto; filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3)); }

.header-contacts h6 { color: #d4af37 !important; }
.header-contacts { color: white !important; }

/* ================================
   NAVBAR
   ================================ */
.nav-strip {
    background: var(--royal-green-dark);
    border-bottom: 3px solid var(--gold-dark);
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

/* top-level links */
.navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 18px 14px !important;
    letter-spacing: 0.5px;
    transition: all .22s ease;
    border-bottom: 3px solid transparent;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.show {
    color: var(--gold-light) !important;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 3px solid var(--gold-main);
}

/* active state by WP classes */
.current-menu-item > a.nav-link,
.current_page_item > a.nav-link {
    color: var(--gold-light) !important;
    border-bottom: 3px solid var(--gold-main) !important;
}

/* ================================
   DROPDOWNS (Multi-level & Hover)
   ================================ */
/* base dropdown panel styling */
.dropdown-menu,
.navbar .dropdown-menu {
    background-color: var(--royal-green-dark);
    border: 1px solid var(--gold-dark);
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    min-width: 260px;
}

/* item inside dropdown */
.dropdown-item,
.navbar .dropdown-item {
    color: #eaeaea !important;
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
    background: transparent !important;
    transition: all .18s ease;
    white-space: normal; /* Дозволяє перенос тексту */
}

/* last item no border */
.dropdown-menu li:last-child .dropdown-item { border-bottom: none !important; }

/* hover on dropdown item */
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item:active {
    background-color: rgba(2, 42, 45, 0.85) !important;
    color: var(--gold-main) !important;
    padding-left: 24px !important;
}

/* Caret / Arrow styling */
.navbar .nav-link.dropdown-toggle::after,
.dropdown-item.dropdown-toggle::after {
    /* content: '\25BE';  - Bootstrap handles this usually, keeping if needed */
    display: inline-block;
    margin-left: .6rem;
    font-size: .7rem;
    opacity: .85;
    transition: transform .18s ease;
}

/* DESKTOP HOVER LOGIC (Must have for clickable parents) */
@media (min-width: 992px) {
    /* Main Dropdown Hover */
    .dropdown:hover > .dropdown-menu {
        display: block;
        animation: fadeIn .2s ease;
        margin-top: 0;
    }

    /* Submenu Positioning & Hover */
    .dropdown-submenu { position: relative; }
    
    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-left: -1px;
        display: none;
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
        animation: fadeIn .2s ease;
    }

    /* Rotate caret on hover for submenus */
    .dropdown-submenu:hover > .dropdown-toggle::after {
        transform: rotate(-90deg);
    }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }

/* Mobile Toggler */
.navbar-toggler {
    border: 1px solid var(--gold-main);
    color: var(--gold-main);
    width: 100%;
    margin: 10px 0;
}
.navbar-toggler:focus { box-shadow: none; }

/* ================================
   HERO / CARDS / SECTIONS
   ================================ */
.premium-hero {
    /* УВАГА: CSS не розуміє PHP. Шлях має бути відносним до style.css */
    background-image: url('img/academynew.jpg'); 
    background-size: cover;
    background-position: center;
    min-height: 70vh;
    background-attachment: fixed;
    border-bottom: 3px solid var(--gold-dark);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.45);
}
.gold-divider { height: 3px; width: 100px; background: var(--gold-main); margin: 20px auto; }

/* cards */
.links-section { background: var(--royal-green-dark); padding: 2rem 0; border-bottom: 3px solid var(--gold-dark); }
//.gold-card { background: linear-gradient(145deg, #0b251f, #061612); }
.gold-card { background: linear-gradient(145deg, #09201b, #051310); padding: 3rem 2rem; border: 1px solid rgba(255, 255, 255, 0.05); color: #fff; transition: .3s; text-align: center; }
.gold-card:hover { transform: translateY(-5px); border-color: var(--gold-main); }

/* useful links */
.useful-links-section { background: var(--bg-dark); padding: 4rem 0; }

/* ================================
   PAGE / SIDEBAR / CONTENT
   ================================ */
.page-header { background: #f4f6f9; padding: 40px 0; border-bottom: 1px solid #e0e0e0; color: #111; }
.page-title { font-weight: 700; color: #3E2723; }
.page-content-wrapper { background: #fff; color: #111; padding: 2rem; border-radius: 6px; border-top: 3px solid var(--gold-main); }

/* Sidebar base */
.sidebar-menu .list-group { background: transparent; }
.sidebar-menu .list-group-item {
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: -1px;
    background: #fff;
    color: #111;
    transition: all .18s ease;
    border-radius: 6px;
}
.sidebar-menu .menu-title { font-family: 'Cinzel', serif; font-weight: 600; color: var(--royal-green); }

/* active / open */
.sidebar-menu .active-menu,
.sidebar-menu .list-group-item.active,
.sidebar-link.active {
    background-color: var(--royal-green) !important;
    color: var(--gold-light) !important;
    border-left: 4px solid var(--gold-main) !important;
    font-weight: 600;
}

/* hover */
.sidebar-menu .list-group-item:hover { background-color: var(--royal-green) !important; color: #fff !important; }

/* submenu container */
.submenu-container { background: #f8f9fa; border-left: 1px solid #dee2e6; border-right: 1px solid #dee2e6; padding-left: 0.5rem; margin-top: .4rem; }
.submenu-link {
    display: block;
    padding: 8px 16px 8px 24px;
    color: #1a1a1a;
    font-size: .95rem;
    border-left: 3px solid transparent;
    transition: all .18s ease;
    background: #fff;
}
.submenu-link:hover { background: rgba(220, 179, 72, 0.1); color: #3E2723; border-left-color: var(--gold-main); }
.submenu-link.active-page { font-weight: 700; color: #3E2723; border-left-color: var(--gold-main); background: rgba(220, 179, 72, 0.05); }

.menu-item-wrapper .collapse { margin-top: .5rem; }

/* ================================
   FOOTER
   ================================ */
.premium-footer { background: var(--bg-dark); padding: 50px 0 20px; border-top: 4px solid var(--gold-dark); color: var(--muted); margin-top: auto; }
.footer-logo-text { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.2rem; color: #fff; }
.footer-heading { color: var(--gold-main); font-family: 'Cinzel', serif; border-bottom: 1px solid rgba(212, 175, 55, 0.3); display: inline-block; margin-top: 15px; margin-bottom: 8px; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: rgba(255, 255, 255, 0.6); transition: .18s; font-size: .85rem; }
.footer-links a:hover { color: #fff; padding-left: 3px; }
.social-btn { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); display: inline-flex; align-items: center; justify-content: center; transition: .25s; }
.social-btn:hover { background: var(--gold-main); color: #000; }

/* ================================
   RESPONSIVE
   ================================ */
@media(max-width: 991px) {
    .premium-hero { min-height: 40vh; background-attachment: scroll; }
    .sticky-top { position: static !important; }
}

/* Mobile specific fixes for Arrows */
@media (max-width: 720px) {
    .dropdown-submenu > a.dropdown-toggle:after {
        font-family: "bootstrap-icons";
        display: inline-block;
        transform: rotate(0deg) !important;
        margin-left: .6rem;
        font-size: .9rem;
    }
}