/* ==========================================================================
   COMMON CSS - HEADER, FOOTER, COOKIE BANNER, MOBILE MENU
   ========================================================================== */

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

body {
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1a1a1a;
}

/* Header Styles */
.main-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: static;
    border-bottom: 1px solid #e5e7eb;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25);
}

.logo-button:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.35);
}

.logo-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(30, 64, 175, 0.3);
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.4rem;
    color: #374151;
    z-index: 1002;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
    background-color: #f8fafc;
}

/* Desktop Navigation */
.main-nav {
    display: flex;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.main-nav a {
    text-decoration: none;
    color: #374151;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.main-nav a:hover {
    background-color: #f8fafc;
    color: #3b82f6;
}

.main-nav a.active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-weight: 600;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 240px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 1000;
    top: 100%;
    left: 0;
    border: 1px solid #e5e7eb;
    padding: 6px 0;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.25s ease;
    pointer-events: none;
}

.dropdown-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #374151;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    gap: 8px;
}

.dropdown-content a:hover {
    background-color: #f0f9ff;
    color: #3b82f6;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

/* Mobile Menu Styles */
.mobile-menu-container {
    display: none;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 140px);
    padding: 0;
}

/* Footer Styles */
.main-footer {
    background: #1f2937;
    color: #f9fafb;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0 2rem;
}

.footer-section h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 1.5rem 0;
    text-align: center;
    color: #9ca3af;
}

/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1.5rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-text {
    flex: 1;
}

.cookie-text h4 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-text p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.6;
}

.cookie-text a {
    color: #60a5fa;
    text-decoration: underline;
}

.cookie-text a:hover {
    color: #93c5fd;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cookie-accept {
    background: #10b981;
    color: white;
}

.cookie-settings {
    background: #3b82f6;
    color: white;
}

.cookie-reject {
    background: #ef4444;
    color: white;
}

.cookie-btn:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cookie-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 1001;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.cookie-settings-modal.show {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.cookie-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-overlay.show {
    display: block;
    opacity: 1;
}

.cookie-modal-title {
    margin-top: 0;
    color: #1f2937;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.cookie-setting {
    margin-bottom: 1rem;
}

.cookie-setting-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cookie-setting-description {
    margin: 0 0 1rem 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.cookie-setting-description-last {
    margin-bottom: 1.5rem;
}

.cookie-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.cookie-modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cookie-modal-btn-cancel {
    border: 2px solid #d1d5db;
    background: white;
    color: #374151;
}

.cookie-modal-btn-cancel:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.cookie-modal-btn-save {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
}

.cookie-modal-btn-save:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.cookie-modal-btn:active {
    transform: translateY(0);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Smooth transitions */
.main-nav a, .dropdown-toggle, .dropdown-content a,
.mobile-menu-toggle, .mobile-menu-close {
    transition: all 0.2s ease;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

/* Large Desktop */
@media (min-width: 1201px) {
    .dropdown:hover .dropdown-content {
        display: block;
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
    }
}

/* Tablet and Mobile Breakpoint */
@media (max-width: 1200px) {
    /* Header adjustments */
    .header-container {
        padding: 0.4rem 1rem;
        height: 56px;
    }
    
    .logo {
        font-size: 0.95rem;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    /* Hide desktop navigation */
    .main-nav {
        display: none;
    }

    .main-nav.mobile-nav {
        display: block;
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Mobile menu container */
    .mobile-menu-container {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        z-index: 1001;
        transition: right 0.3s ease;
        overflow-y: auto;
    }
    
    .mobile-menu-container.active {
        right: 0;
    }
    
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .mobile-menu-close {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: #374151;
        padding: 0.25rem;
    }
    
    /* Mobile navigation */
    .mobile-nav {
        padding: 1rem 0;
    }
    
    .mobile-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .mobile-nav a,
    .mobile-nav .dropdown-toggle {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        text-decoration: none;
        color: #374151;
        border-bottom: 1px solid #f8fafc;
        font-size: 0.95rem;
        width: 100%;
        background: none;
        border-left: none;
        border-right: none;
        border-top: none;
        cursor: pointer;
        justify-content: space-between;
    }
    
    .mobile-nav .dropdown-toggle::after {
        content: '\25BC';
        font-size: 0.7rem;
        color: #94a3b8;
        transition: transform 0.2s ease;
    }
    
    .mobile-nav .dropdown.active > .dropdown-toggle::after {
        transform: rotate(-180deg);
        color: #2563eb;
    }
    
    .mobile-nav a:hover,
    .mobile-nav .dropdown-toggle:hover {
        background-color: #f8fafc;
        color: #3b82f6;
    }
    
    /* Mobile dropdown */
    .mobile-nav .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background: #f8fafc;
        padding: 0;
        margin: 0;
        transform: none;
        opacity: 1;
        pointer-events: auto;
    }
    
    .mobile-nav .dropdown.active .dropdown-content {
        display: block;
    }
    
    .mobile-nav .dropdown-content.show {
        display: block;
    }
    
    .mobile-nav .dropdown-content a {
        padding: 10px 16px 10px 32px;
        border-bottom: 1px solid #e5e7eb;
        font-size: 0.9rem;
    }
    
    .mobile-nav .dropdown-content a:last-child {
        border-bottom: 1px solid #f8fafc;
    }
    
    /* Cookie banner mobile */
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

/* Mobile Portrait */
@media (max-width: 768px) {
    .header-container {
        padding: 0.25rem 0.75rem;
        height: 52px;
    }
    
    .logo {
        font-size: 0.9rem;
    }
    
    .logo-button {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
    
    .mobile-menu-container {
        width: 280px;
    }
    
    .mobile-nav a,
    .mobile-nav .dropdown-toggle {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .mobile-nav .dropdown-content a {
        padding: 8px 14px 8px 24px;
        font-size: 0.8rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 0 1.5rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .header-container {
        padding: 0.25rem 0.5rem;
        height: 46px;
    }
    
    .logo {
        font-size: 0.95rem;
    }
    
    .logo h1 {
        font-size: 1rem;
    }
    
    .mobile-menu-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    .mobile-menu-container {
        width: 260px;
    }
}

