/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Header Styles - Brown background */
.site-header {
    background: #8B4513;
    border-bottom: 1px solid #654321;
    padding: 0;
}

/* Header Top Section with Logo */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    background: #8B4513;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    display: flex;
    height: 150px;
    width: 120px;
    border-radius: 8px;
}

.school-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.school-subtitle {
    font-size: 14px;
    color: #f0f0f0;
    margin: 0;
    font-weight: 500;
}

/* Language Flags Section - Only Romanian */
.language-flags {
    display: flex;
    gap: 10px;
    align-items: center;
}

.flag-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    text-decoration: none;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
    font-size: 13px;
    font-weight: 500;
}

.flag-button:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.flag-button.active {
    background: rgba(255,255,255,0.3);
    color: #ffffff;
    border-color: rgba(255,255,255,0.5);
}

.flag {
    width: 20px;
    height: 15px;
}

/* Navigation Menu - Brown background */
.main-nav {
    background: #654321;
    padding: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: stretch;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 50px;
    flex-wrap: wrap;
}

.nav-menu li {
    position: relative;
    display: flex;
    align-items: stretch;
    flex: 0 0 auto;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: white;
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    height: 50px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.nav-link:hover,
.nav-link.active {
    background-color: #5a3a1a;
}

.nav-link i {
    margin-left: 4px;
    font-size: 9px;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 3px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 280px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    border: 1px solid #ddd;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid #eee;
    display: block;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    color: #333;
    padding: 12px 16px;
    display: block;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    height: auto;
    border: none;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
}

/* Search Button in Navigation */
.search-btn {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #5a3a1a;
}

/* Main Content */
.main-content {
    padding: 20px 0;
    min-height: calc(100vh - 200px);
    background: #ffffff;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

/* Articles Section */
.articles-section {
    background: white;
}

.article-card {
    border-bottom: 1px solid #eee;
    padding-bottom: 25px;
    margin-bottom: 25px;
}

.article-card:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-header {
    margin-bottom: 10px;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}

.article-title a {
    color: #8B4513;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #654321;
    text-decoration: underline;
}

.article-date {
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.article-content {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

.article-content p {
    margin-bottom: 12px;
}

.article-links {
    margin: 12px 0;
}

.doc-link {
    display: block;
    color: #8B4513;
    text-decoration: none;
    margin-bottom: 4px;
    transition: color 0.3s ease;
    font-size: 14px;
}

.doc-link:hover {
    color: #654321;
    text-decoration: underline;
}

.read-more {
    color: #8B4513;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 14px;
}

.read-more:hover {
    color: #654321;
    text-decoration: underline;
}

/* Enrollment Table */
.enrollment-table {
    margin: 15px 0;
    overflow-x: auto;
}

.enrollment-table table {
    width: 100%;
    border-collapse: collapse;
    background: #f9f9f9;
    border: 1px solid #ddd;
}

.enrollment-table td {
    padding: 10px;
    border: 1px solid #ddd;
    vertical-align: top;
    font-size: 13px;
}

.enrollment-table td:first-child {
    font-weight: 600;
    background: #f0f0f0;
    width: 30px;
    text-align: center;
}

.enrollment-table td:nth-child(2) {
    font-weight: 600;
    background: #f0f0f0;
    min-width: 180px;
}

/* Pagination */
.pagination {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-start;
    font-size: 14px;
}

.page-current {
    font-weight: 600;
    color: #333;
}

.page-link,
.page-next {
    color: #8B4513;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-link:hover,
.page-next:hover {
    color: #654321;
    text-decoration: underline;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-widget {
    background: #f8f9fa;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.sidebar-link {
    display: block;
    color: #8B4513;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
    font-size: 13px;
}

.sidebar-link:hover {
    color: #654321;
    text-decoration: underline;
}

.sidebar-link.featured {
    font-size: 14px;
    font-weight: 700;
}

.sidebar-separator {
    height: 1px;
    background: #ddd;
    margin: 0 -15px;
}

.partner-link {
    display: block;
    text-align: center;
    margin-bottom: 8px;
}

.partner-logo {
    max-width: 100%;
    height: auto;
}

.partner-text {
    color: #8B4513;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    font-size: 13px;
}

.partner-text:hover {
    color: #654321;
    text-decoration: underline;
}

.widget-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.visitor-count {
    font-size: 20px;
    font-weight: 700;
    color: #8B4513;
    text-align: center;
}

/* Footer */
.site-footer {
    background: #8B4513;
    color: white;
    padding: 15px 0;
    text-align: center;
    margin-top: 30px;
}

.copyright {
    font-size: 12px;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #8B4513;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: #654321;
    transform: translateY(-2px);
}

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 20px;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-size: 14px;
}

.cookie-notice.show {
    transform: translateY(0);
}

.cookie-notice p {
    margin-bottom: 15px;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.cookie-settings,
.cookie-accept {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.cookie-settings {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.cookie-settings:hover {
    background: white;
    color: black;
}

.cookie-accept {
    background: #8B4513;
    color: white;
}

.cookie-accept:hover {
    background: #654321;
}

/* Search Overlay Styles */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.search-container {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    from { transform: translateY(50px); }
    to { transform: translateY(0); }
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.search-header h2 {
    margin: 0;
    color: #8B4513;
}

.search-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.search-close:hover {
    background: #f0f0f0;
}

.search-form {
    display: flex;
    padding: 20px;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #8B4513;
}

.search-submit {
    background: #8B4513;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background: #654321;
}

.search-results {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
    color: #666;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-link {
        padding: 0 8px;
        font-size: 9px;
    }
}

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .nav-menu {
        height: auto;
        min-height: 50px;
    }

    .nav-link {
        height: 45px;
        font-size: 9px;
        padding: 0 6px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-top {
        padding: 10px 0;
    }

    .school-title h1 {
        font-size: 20px;
    }

    .logo {
        height: 50px;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        height: auto;

    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        height: 40px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        justify-content: flex-start;
        padding: 0 15px;
        font-size: 10px;
    }

    .article-title {
        font-size: 16px;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .enrollment-table {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px 0;
    }

    .article-title {
        font-size: 15px;
    }

    .sidebar-widget {
        padding: 12px;
    }

    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 16px;
    }

    .school-title h1 {
        font-size: 18px;
    }

    .logo {
        height: 45px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #654321;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #654321;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .site-header,
    .sidebar,
    .site-footer,
    .scroll-top,
    .cookie-notice {
        display: none;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   MOBILE HEADER + HAMBURGER (added, keeps your design)
   ========================================================= */
.nav-toggle{
  display:none;
  background: transparent;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span{
  display:block;
  width: 28px;
  height: 3px;
  margin: 5px 0;
  background: #fff;
  border-radius: 2px;
}

@media (max-width: 768px){
  .site-header .container{
    display:flex;
    align-items:center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }

  /* logo aligned */
  .logo-section{ gap: 10px; }
  .logo{ height: 44px; width:auto; }

  .nav-toggle{ display:block; }

  /* collapse menu */
  .main-nav{
    width: 100%;
    display:none;
  }
  .main-nav.is-open{ display:block; }

  .nav-menu{
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
  }
  .nav-menu li a{ display:block; padding: 10px 12px; }
  /* dropdown menus should be full width on mobile */
  .dropdown-menu{
    position: static !important;
    transform: none !important;
    width: 100% !important;
    box-shadow: none !important;
  }

  @media (max-width: 768px){

  /* când dropdown-ul e ÎNCHIS → fără spațiu */
  .dropdown .dropdown-menu{
    display: none;
    margin: 0;
    padding: 0;
  }

  /* când dropdown-ul e DESCHIS */
  .dropdown.open .dropdown-menu{
    display: block;
    margin-top: 6px;
    padding-left: 12px;
  }
}

}

/* =========================================================
   RESPONSIVE PDF EMBEDS (added)
   ========================================================= */
embed[src$=".pdf"], iframe[src$=".pdf"], object[data$=".pdf"]{
  width: 100% !important;
  max-width: 100% !important;
  height: 80vh !important;
  border: none !important;
  display: block !important;
  margin: 10px 0 !important;
}

@media (max-width: 768px){
  embed[src$=".pdf"], iframe[src$=".pdf"], object[data$=".pdf"]{
    height: 78vh !important;
  }
}

/* =========================================================
   LIGHTBOX STYLES (added)
   ========================================================= */
.cc-lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.9);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:99999;
}
.cc-lightbox.is-open{ display:flex; }
.cc-lightbox__img{ max-width:92vw; max-height:88vh; }
.cc-lightbox__btn{
  position:absolute;
  background:transparent;
  border:0;
  color:#fff;
  font-size:34px;
  cursor:pointer;
  user-select:none;
  line-height:1;
  padding:10px;
}
.cc-lightbox__close{ top:10px; right:14px; font-size:36px; }
.cc-lightbox__prev{ left:10px; }
.cc-lightbox__next{ right:10px; }
