/**
 * Main CSS File for SWEON Website
 * This file contains all the necessary styles for the entire website
 * Version: 1.0
 */

/* Import Epilogue font */
@import url('https://fonts.googleapis.com/css2?family=Epilogue:ital,wght@0,100..900;1,100..900&display=swap');

/* CSS Variables - Updated for consistent button colors, serif logo, and login modal */
:root {
    --epilogue-font: 'Epilogue', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --primary-color: #041E42;
    --secondary-color: #1a3a6b;
    --accent-color: #4a90e2;
    --text-color: #2c3e50;
    --text-light: #6c757d;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--epilogue-font);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
}

/* Global Interaction Styles */
button, .btn, a[href], input[type="button"], input[type="submit"], input[type="reset"], 
.clickable, [onclick], [role="button"] {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    user-select: none;
}

/* Default Button Styling - Header Blue Theme */
button, .btn, input[type="button"], input[type="submit"], input[type="reset"] {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button:hover, .btn:hover, input[type="button"]:hover, 
input[type="submit"]:hover, input[type="reset"]:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(4, 30, 66, 0.3);
}

button:active, .btn:active, input[type="button"]:active, 
input[type="submit"]:active, input[type="reset"]:active {
    background: var(--primary-color);
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(4, 30, 66, 0.2);
}

button:hover, .btn:hover, a[href]:hover, input[type="button"]:hover, 
input[type="submit"]:hover, input[type="reset"]:hover, .clickable:hover, 
[onclick]:hover, [role="button"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active, .btn:active, a[href]:active, input[type="button"]:active, 
input[type="submit"]:active, input[type="reset"]:active, .clickable:active, 
[onclick]:active, [role="button"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* HEADER STYLES - MODERN RESPONSIVE DESIGN */
header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: linear-gradient(135deg, #041E42 0%, #1a3a6b 100%) !important;
    font-family: var(--epilogue-font) !important;
    padding: 8px 20px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
    position: relative !important;
    z-index: 1000 !important;
    /* min-height: 60px !important; */
    height: clamp(60px, 10vh, 100px) !important;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.header-logo {
    height: clamp(50px, 8vw, 80px) !important;
    width: auto !important;
    filter: brightness(1.1) !important;
}

.header-title {
    line-height: 1.2;
    flex: 1;
}

.header-title .main-title {
    font-size: clamp(24px, 4vh, 34px) !important;
    font-weight: bold !important;
    font-family: 'Serif', serif !important;
    color: #ffffff !important;
    margin: 0 !important;
    letter-spacing: -0.01em !important;
}

.header-title .subtitle {
    font-size: clamp(12px, 1.1vw, 16px);
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 400;
}

/* Desktop Navigation */
.header-nav.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: clamp(16px, 1.4vw, 20px);
    font-weight: 500;
    padding: 12px 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:first-child {
    border-left: none;
}

.nav-link:hover {
    color: #4a90e2;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #4a90e2;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link i {
    margin-right: 8px;
    font-size: 16px;
}


/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: #ffffff;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 80vw;
    height: 100vh;
    background: linear-gradient(180deg, #041E42 0%, #1a3a6b 50%, #041E42 100%);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.4);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-overlay.active .mobile-nav {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-logo-img {
    height: 36px;
    width: auto;
    filter: brightness(1.1);
}

.mobile-logo-text {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.mobile-nav-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.mobile-nav-links {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    padding: 16px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    margin: 4px 0;
    position: relative;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(74, 144, 226, 0.2), rgba(74, 144, 226, 0.1));
    transition: width 0.3s ease;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #4a90e2;
    transform: translateX(8px);
}

.mobile-nav-link:hover::before {
    width: 100%;
}

.mobile-nav-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: #4a90e2;
}


/* Mobile User Section */
.mobile-user-section {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.mobile-user-info {
    margin-bottom: 16px;
}

.mobile-user-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.mobile-user-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* User Dropdown Styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    font-size: clamp(16px, 1.4vw, 28px);
    padding: 0 15px;
    border-left: 1px solid #ffffff;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    z-index: 1001;
    pointer-events: auto;
    user-select: none;
}

.user-dropdown-toggle:hover {
    color: #7b7b7b;
    text-decoration: underline;
}

.user-dropdown-toggle:active {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

.user-dropdown-toggle i {
    margin-right: 0;
    transition: transform 0.2s ease-in-out;
}

.user-dropdown-toggle.active i {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease-in-out;
}

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

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

.user-dropdown-menu a i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* FOOTER STYLES */
footer {
    background: #041E42;
    color: #e8e8e8;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin: 10px 0 10px 0;
    /* margin-bottom: 10px; */
    padding: 0 20px;
    max-width: none;
}

.footer-top a {
    color: #e8e8e8;
    text-decoration: none;
    font-size: 16px;
    font-weight: 300;
    padding: 0 15px;
    border-left: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
}

.footer-top a:first-child {
    border-left: none;
}

.footer-top a:hover {
    color: #f0f0f0;
}

.footer-top i {
    margin-right: 6px;
}

.footer-bottom {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.6;
    text-align: center;
    text-justify: inter-word;
    width: 100%;
    padding: 0 20px;
    max-width: none;
}

.footer-bottom a.intext {
    color: #e8e8e8;
    text-decoration: underline;
    font-weight: 300;
}

.footer-bottom a.intext:hover {
    color: #f0f0f0;
}

/* RESPONSIVE DESIGN */
@media screen and (max-width: 1024px) {
    /* Hide desktop navigation on tablets */
    .header-nav.desktop-nav {
        display: none;
    }
    
    /* Show hamburger menu */
    .hamburger-menu {
        display: flex;
    }
    
    /* Adjust header layout */
    header {
        padding: 6px 15px !important;
        min-height: 50px !important;
    }
    
    .header-title .main-title {
        font-size: clamp(20px, 3.5vh, 28px) !important;
        font-family: 'Serif', serif !important;
        font-weight: bold !important;
    }
    
    .header-logo {
        height: clamp(35px, 3.5vw, 60px) !important;
    }
}

@media screen and (max-width: 768px) {
    /* Mobile header adjustments */
    header {
        padding: 5px 15px !important;
        min-height: 45px !important;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .header-logo {
        height: clamp(30px, 3vw, 50px) !important;
    }
    
    .header-title .main-title {
        font-size: clamp(18px, 3vh, 24px) !important;
        font-family: 'Serif', serif !important;
        font-weight: bold !important;
        line-height: 1.3;
    }
    
    .header-right {
        gap: 15px;
    }
    
    /* Hide user dropdown on mobile - will be shown in mobile nav */
    .user-dropdown {
        display: none;
    }
    
    /* Mobile navigation adjustments */
    .mobile-nav {
        width: 280px;
        max-width: 75vw;
    }
    
    .mobile-nav-link {
        font-size: 16px;
        padding: 14px 20px;
    }
    
    .mobile-nav-header {
        padding: 16px 20px;
    }
    
    .mobile-logo-img {
        height: 32px;
    }
    
    .mobile-logo-text {
        font-size: 18px;
    }
    
    /* Footer responsive */
    .footer-top {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-top a {
        padding: 5px 0;
        border-left: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        width: 100%;
        justify-content: center;
    }
    
    .footer-top a:last-child {
        border-bottom: none;
    }
}

@media screen and (max-width: 480px) {
    header {
        padding: 4px 12px !important;
        height: clamp(60px, 5vh, 80vh) !important;
        /* min-height: 60px !important; */
    }
    
    .header-left {
        gap: 6px;
    }
    
    .header-logo {
        height: clamp(45px, 3vw, 65px) !important;
    }
    
    .header-title .main-title {
        font-size: clamp(24px, 2.5vh, 32px) !important;
        font-family: 'Serif', serif !important;
        font-weight: bold !important;
        line-height: 1.4;
    }
    
    .hamburger-menu {
        width: 35px;
        height: 35px;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
    }
    
    /* Mobile navigation for small screens */
    .mobile-nav {
        width: 260px;
        max-width: 70vw;
    }
    
    .mobile-nav-link {
        font-size: 15px;
        padding: 12px 18px;
    }
    
    .mobile-nav-header {
        padding: 14px 18px;
    }
    
    .mobile-logo-img {
        height: 28px;
    }
    
    .mobile-logo-text {
        font-size: 16px;
    }
    
    .mobile-nav-close {
        font-size: 16px;
        width: 32px;
        height: 32px;
    }
}

/* Page-specific styles can be added here or in separate files if needed */

/* LOGIN MODAL STYLES */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.login-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.login-modal-header h2 {
    color: #041E42;
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    font-family: 'Serif', serif;
}

.login-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.login-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.login-modal-body {
    padding: 0 24px 24px 24px;
}

.login-modal-description {
    color: #6b7280;
    margin: 0 0 24px 0;
    font-size: 14px;
    line-height: 1.5;
}

.login-modal .form-group {
    margin-bottom: 20px;
}

.login-modal .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.login-modal .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.login-modal .form-group input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.login-modal-button {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #041E42 0%, #1a3a6b 100%);
    color: white;
    border: 1px solid #041E42;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.login-modal-button:hover {
    background: linear-gradient(135deg, #1a3a6b 0%, #4a90e2 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(4, 30, 66, 0.3);
}

.login-modal-button:active {
    transform: translateY(0);
}

.login-modal-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid #fecaca;
}

/* Mobile responsive for modal */
@media (max-width: 768px) {
    .login-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .login-modal-header {
        padding: 20px 20px 0 20px;
    }
    
    .login-modal-body {
        padding: 0 20px 20px 20px;
    }
    
    .login-modal-header h2 {
        font-size: 20px;
    }
}
