@import url('https://fonts.googleapis.com/css2?family=Quattrocento:wght@400;700&display=swap');

body {
    font-family: 'Quattrocento', serif;
}

/* Header Styles */
#header {
    width: 100%;
    margin: 0 auto;
    background: linear-gradient(to bottom, white 98%, coral 2%);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
}

/* Top Bar Component */
.top-bar {
    background-color: teal;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;

.top-bar-container {
    max-width: 1440px;
    display: flex;
    margin: 0 auto;
    justify-content: space-between;
        margin-top: 2px;
        margin-bottom: 2px;

        .welcome-note-container {
            .welcome-note {
    font-size: 1rem;
    color: gold;
    font-weight: 900;
    text-decoration: none;
    margin-left: 300px;
}
        }
        
        .social-icons-container {
            .social-icons {
                gap: 20px;
                display: flex;
                align-items: center;
                
                a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    font-size: 15px;
    margin-top: 5px;

                    &:hover {
    color: coral;
    opacity: 1;
                    }
                }
            }
}

.auth-buttons-container {
    margin-right: 100px;
            
            .auth-buttons {
                display: flex;
                gap: 10px;
    }

#registerBtn, #loginBtn {
    background-color: transparent;
    color: white;
    padding: 5px;
    margin-left: 10px;
    cursor: pointer;
    border: none;
    font-size: 0.9em;
    text-decoration: none;

                &:hover {
    background-color: coral;
    color: #333;
    border-radius: 20px;
                }
            }
        }
    }
}

/* Main Header Component */
.main-header {
  margin-top: 50px;
  padding-bottom: 10px;

.main-header-container {
    max-width: 1440px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0;

        .logo-container {
    display: flex;
    flex-direction: row;
    align-items: center;
            
            .logo {
    display: flex;
    align-items: center;
    margin-left: 20px;

                img {
    width: 100px;
   margin-right: 10px;
                }
}

            .company-name-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    margin-left: 10px;
}

.company-name-research {
    color: teal;
}

.company-name-publishing {
    color: coral;
}

.company-name-link {
    text-decoration: none;
    color: inherit;
            }
}

        .nav-container {
    display: block;
    margin: auto auto;
    margin-left: auto;
    margin-right: 10px;

            nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.2em;
    font-weight: bold;
    margin-right: 20px;
                
                .nav-toggle-container {
                    display: none;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: black;
                    /* Ensure this is the only nav-toggle in the header */
                    z-index: 1002;
}

.nav-close-btn {
    display: none;
}

                .nav-content-container {
                    .nav-content {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
    gap: 20px;
 
                        li {
    margin-right: 1px;
    position: relative;

.nav-link {
    text-decoration: none;
    color: black;
    transition: 0.3s ease;
    font-weight: bolder;
    font-size: 1.2em;
    padding: 5px 10px;
    display: block;
    margin-left: 6px;

                                &:hover, &:hover:not(.active) {
    color: coral;
    transition: 0.3s ease;
                                }
                                
                                &.active {
                                    font-weight: bold;
                                    color: teal;
                                }
}

.dropdown-menu {
    display: none;
    position: absolute;
                                z-index: 1000;
    background-color: beige;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
                                
                                li {
    margin: 0;

                                    a, .dropdown-item {
    display: block;
    background-color: beige;
    color: teal;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    padding: 8px 14px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;

                                        &:hover {
    background-color: gold;
    color: teal;
                                        }
                                    }
                                }
                            }
                            
                            &.dropdown:hover .dropdown-menu {
                                display: block;
                                top: 100%;
                                left: 0;
                            }
                            
                            &:nth-child(2) .dropdown-menu {
    margin-left: 25px;
}
                        }
                    }
                }
            }
        }
    }
}
/* ========================================
   HIDE DUPLICATE NAVIGATION ELEMENTS
   ======================================== */

/* Hide any OJS or system-added navigation toggles outside our header */
body > .nav-toggle,
body > .mobile-nav,
body > .mobile-menu,
#header ~ .nav-toggle,
#header ~ .mobile-nav,
#header ~ .mobile-menu,
.nav-toggle:not(#header .nav-toggle),
/* Hide any navigation elements that might be added by OJS */
.pkp_nav_toggle,
.pkp_nav_mobile,
.pkp_mobile_nav,
/* Hide any navigation elements outside our header */
#header ~ * .nav-toggle,
#header ~ * .mobile-nav,
#header ~ * .mobile-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* Ensure our header navigation toggle is properly visible */
#header .nav-toggle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: auto !important;
    pointer-events: auto !important;
}

/* ========================================
   RESPONSIVE DESIGN - HARMONIZED BREAKPOINTS
   ======================================== */

/* Desktop: Above 1024px - Default styling (no media query needed) */
/* All default styles above this section apply to desktop */

/* Large Desktop: Above 1280px - Hide hamburger menu */
@media (min-width: 1280px) {
    .nav-toggle {
        display: none !important;
    }
    
    .nav-close-btn {
        display: none !important;
    }
    
    .nav-content {
        display: flex !important;
    }
    
    .nav-content-container {
        display: block !important;
    }
}

/* Tablet: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
    .main-header {
        margin-top: 40px;
        
        .main-header-container {
            .nav-container {
                margin: 20px;
                width: auto;
                justify-content: flex-end;
                flex: 0 0 auto;
                
                nav {
                    margin-right: 0;
                    font-size: 0.9em;
                    
                    /* Backdrop overlay for tablet menu */
                    &::before {
                        content: '';
                        position: fixed;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        background: rgba(0, 0, 0, 0.5);
                        -webkit-backdrop-filter: blur(4px);
                        backdrop-filter: blur(4px);
                        z-index: 1999;
                        opacity: 0;
                        visibility: hidden;
                        transition: all 0.3s ease;
                    }
                    
                    &.menu-open::before {
                        opacity: 1;
                        visibility: visible;
                    }
                    
                    .nav-content-container {
                        .nav-content {
        display: none;
        flex-direction: column;
                            width: 90%;
                            max-width: 350px;
                            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        position: fixed;
                            top: 30%;
        left: 50%;
                            transform: translate(-50%, -50%) scale(0.95);
        z-index: 2000;
                            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
                            border-radius: 16px;
                            padding: 20px 0;
                            border: 1px solid rgba(0, 0, 0, 0.05);
                            opacity: 0;
                            visibility: hidden;
                            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                            
                            &.active {
                                display: flex;
                                opacity: 1;
                                visibility: visible;
                                transform: translate(-50%, -50%) scale(1);
                            }
                            
                            li {
                                margin: 0;
                                border-bottom: 1px solid rgba(0, 0, 0, 0.08);
                                position: relative;
                                
                                &:last-child {
                                    border-bottom: none;
                                }
                                
                                .nav-link {
        display: flex;
                                    align-items: center;
                                    justify-content: space-between;
                                    padding: 16px 24px;
                                    margin: 0;
                                    font-size: 1.1em;
                                    font-weight: 500;
                                    color: #2c3e50;
                                    text-decoration: none;
                                    transition: all 0.2s ease;
                                    border-radius: 0;
                                    position: relative;
                                    overflow: hidden;
                                    
                                    &.dropdown-toggle::after {
                                        content: '▼';
                                        font-size: 0.8em;
                                        margin-left: 8px;
                                        transition: transform 0.3s ease;
                                    }
                                    
                                    &.dropdown-toggle.show::after {
                                        transform: rotate(180deg);
                                    }
                                    
                                    &:hover {
                                        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
                                        color: white;
                                        transform: translateX(4px);
                                        
                                        &::before {
                                            content: '';
                                            position: absolute;
                                            left: 0;
                                            top: 0;
                                            height: 100%;
                                            width: 4px;
                                            background: #ffc107;
                                        }
                                    }
                                    
                                    &.active {
                                        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
                                        color: white;
                                        
                                        &::before {
                                            content: '';
                                            position: absolute;
                                            left: 0;
                                            top: 0;
                                            height: 100%;
                                            width: 4px;
                                            background: #ffc107;
                                        }
                                    }
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
                                    background: rgba(248, 249, 250, 0.95);
                                    padding: 0;
                                    margin: 0;
                                    border-radius: 0;
                                    border: none;
                                    max-height: 0;
                                    overflow: hidden;
                                    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                                    opacity: 0;
                                    transform: translateY(-10px);
                                    
                                    &.show {
                                        max-height: 500px !important;
                                        opacity: 1 !important;
                                        transform: translateY(0) !important;
                                        padding: 8px 0 !important;
                                        display: block !important;
                                        visibility: visible !important;
                                        /* Additional debugging styles */
                                        background: rgba(248, 249, 250, 0.95) !important;
                                        border: 1px solid rgba(0, 0, 0, 0.1) !important;
                                        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
                                    }
                                    
                                    li {
                                        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
                                        margin: 0;
                                        
                                        &:last-child {
                                            border-bottom: none;
                                        }
                                        
                                        a, .dropdown-item {
                                            display: block;
                                            padding: 12px 24px 12px 48px;
                                            color: #6c757d;
                                            font-size: 0.95em;
                                            font-weight: 400;
                                            text-decoration: none;
                                            transition: all 0.2s ease;
                                            border-radius: 0;
                                            
                                            &:hover {
                                                background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
                                                color: #007bff;
                                                transform: translateX(8px);
                                                text-decoration: none;
                                            }
                                            
                                            &:active {
                                                background: linear-gradient(135deg, #dee2e6 0%, #ced4da 100%);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    
                    .nav-toggle-container {
                        display: block;
                    }
                    
                    .nav-toggle {
                        display: block;
                        font-size: 24px;
                        padding: 8px 12px;
                        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
                        color: white;
                        border: none;
                        border-radius: 8px;
                        cursor: pointer;
                        transition: all 0.3s ease;
                        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
                        
                        &:hover {
                            transform: translateY(-2px);
                            box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
                            background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
                        }
                        
                        &:active {
                            transform: translateY(0);
                            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
                        }
                    }
                    
                    .nav-close-btn {
                        position: absolute;
                        top: 10px;
                        right: 15px;
                        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
                        color: white;
                        border: none;
                        border-radius: 50%;
                        width: 30px;
                        height: 30px;
                        font-size: 16px;
                        cursor: pointer;
                        z-index: 1001;
                        transition: all 0.3s ease;
                        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        
                        &:hover {
                            transform: scale(1.1);
                            box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
                            background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
                        }
                        
                        &:active {
                            transform: scale(0.95);
                        }
                        
                        &.open {
                            display: flex;
                        }
                    }
                }
            }
        }
    }
    
    .top-bar .top-bar-container {
        .welcome-note-container .welcome-note {
            margin-left: 100px;
        }
        
        .auth-buttons-container {
            margin-right: 50px;
        }
    }

    .modal-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        
        &.active {
            display: block;
        }
    }
}

/* Mobile: Below 768px (includes all mobile devices) */
@media (max-width: 767px) {
    .main-header {
        margin-top: 25px;
        
        .main-header-container {
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            padding: 5px;
            
            .logo-container {
                display: flex;
                flex-direction: row;
                align-items: center;
                margin-bottom: 0;
                justify-content: flex-start;
                flex: 1;
                
                .logo {
                    margin-left: 0;
                    
                    img {
                        width: 60px;
                        margin-right: 6px;
                    }
    }

    .company-name-container {
        margin-left: 0;
                    font-size: 1em;
                    flex-direction: column;
                    line-height: 1;
                    width: auto;
                    text-align: left;
                }
            }
            
            .nav-container {
                margin: 5px;
                width: auto;
                justify-content: flex-end;
                flex: 0 0 auto;
                
                nav {
                    margin-right: 0;
                    font-size: 0.9em;
                    
                    /* Backdrop overlay for mobile menu */
                    &::before {
                        content: '';
                        position: fixed;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        background: rgba(0, 0, 0, 0.5);
                        -webkit-backdrop-filter: blur(4px);
                        backdrop-filter: blur(4px);
                        z-index: 1999;
                        opacity: 0;
                        visibility: hidden;
                        transition: all 0.3s ease;
                    }
                    
                    &.menu-open::before {
                        opacity: 1;
                        visibility: visible;
                    }
                    
                    .nav-content-container {
                        .nav-content {
        display: none;
        flex-direction: column;
                            width: 90%;
                            max-width: 350px;
                            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        position: fixed;
                            top: 50%;
        left: 50%;
                            transform: translate(-50%, -50%) scale(0.95);
        z-index: 2000;
                            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
                            border-radius: 10px;
                            padding: 5px 0;
                            border: 1px solid rgba(0, 0, 0, 0.05);
                            opacity: 0;
                            visibility: hidden;
                            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                            
                            &.active {
                                display: flex;
                                opacity: 1;
                                visibility: visible;
                                transform: translate(-50%, -50%) scale(1);
                            }
                            
                            li {
                                margin: 0;
                                border-bottom: 1px solid rgba(0, 0, 0, 0.08);
                                position: relative;
                                
                                &:last-child {
                                    border-bottom: none;
                                }
                                
                                .nav-link {
        display: flex;
                                    align-items: center;
                                    justify-content: space-between;
                                    padding: 10px 10px;
                                    margin: 0;
                                    font-size: 1.1em;
                                    font-weight: 500;
                                    color: #008080;
                                    text-decoration: none;
                                    transition: all 0.2s ease;
                                    border-radius: 0;
                                    position: relative;
                                    overflow: hidden;
                                    
                                    &.dropdown-toggle::after {
                                        content: '▼';
                                        font-size: 0.8em;
                                        margin-left: 8px;
                                        transition: transform 0.3s ease;
                                    }
                                    
                                    &.dropdown-toggle.show::after {
                                        transform: rotate(180deg);
                                    }
                                    
                                    &:hover {
                                        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
                                        color: white;
                                        transform: translateX(4px);
                                        
                                        &::before {
                                            content: '';
                                            position: absolute;
                                            left: 0;
                                            top: 0;
                                            height: 100%;
                                            width: 4px;
                                            background: #ffc107;
                                        }
                                    }
                                    
                                    &.active {
                                        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
                                        color: white;
                                        
                                        &::before {
                                            content: '';
                                            position: absolute;
                                            left: 0;
                                            top: 0;
                                            height: 100%;
                                            width: 4px;
                                            background: #ffc107;
                                        }
                                    }
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
                                    background: rgba(248, 249, 250, 0.95);
                                    padding: 0;
                                    margin: 0;
                                    border-radius: 0;
                                    border: none;
                                    max-height: 0;
                                    overflow: hidden;
                                    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                                    opacity: 0;
                                    transform: translateY(-10px);

                                    
                                    &.show {
                                        max-height: 500px !important;
                                        opacity: 1 !important;
                                        transform: translateY(0) !important;
                                        padding: 8px 0 !important;
                                        display: block !important;
                                        visibility: visible !important;
                                    }
                                    
                                    li {
                                        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
                                        margin: 0;
                                        
                                        &:last-child {
                                            border-bottom: none;
                                        }
                                        
                                        a, .dropdown-item {
                                            display: block;
                                            padding: 12px 24px 12px 48px;
                                            color: #6c757d;
                                            font-size: 0.95em;
                                            font-weight: 400;
                                            text-decoration: none;
                                            transition: all 0.2s ease;
                                            border-radius: 0;
                                            
                                            &:hover {
                                                background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
                                                color: #007bff;
                                                transform: translateX(8px);
                                                text-decoration: none;
                                            }
                                            
                                            &:active {
                                                background: linear-gradient(135deg, #dee2e6 0%, #ced4da 100%);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    
                    .nav-toggle-container {
        display: block;
    }
                    
                    .nav-toggle {
                        display: block;
                        font-size: 20px;
                        padding: 8px 8px;
                        background: linear-gradient(135deg, #008080 0%, #0056b3 100%);
                        color: white;
                        border: none;
                        border-radius: 8px;
                        cursor: pointer;
                        transition: all 0.3s ease;
                        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
                        
                        &:hover {
                            transform: translateY(-2px);
                            box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
                            background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
                        }
                        
                        &:active {
                            transform: translateY(0);
                            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
                        }
                    }
                    
    .nav-close-btn {
        position: absolute;
                        top: 10px;
                        right: 15px;
                        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
                        color: white;
        border: none;
                        border-radius: 50%;
                        width: 30px;
                        height: 30px;
                        font-size: 16px;
        cursor: pointer;
        z-index: 1001; 
                        transition: all 0.3s ease;
                        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        
                        &:hover {
                            transform: scale(1.1);
                            box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
                            background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
                        }
                        
                        &:active {
                            transform: scale(0.95);
                        }
                        
                        &.open {
                            display: flex;
                        }
                    }
                }
            }
        }
    }
    
    .top-bar .top-bar-container {
        flex-direction: row;
        align-items: center;
        padding: 2px 5px;
        
        .welcome-note-container .welcome-note {
        margin-left: 0;
            font-size: 0.75rem;
            text-align: left;
            margin-bottom: 2px;
        }
        
        .auth-buttons-container {
            margin-right: 0;
            margin-top: 2px;
            
            #registerBtn, #loginBtn {
                padding: 2px 6px;
                font-size: 0.75em;
                margin-left: 5px;
            }
        }
        
        .social-icons-container .social-icons {
            display: none;
            gap: 10px;
            margin-top: 2px;
            
            a {
                gap: 5px;
                margin-bottom: 2px;
                font-size: 12px;
            }
        }
    }
}
