/* ============================================
   LAYOUT - MODERN STYLES
   Main layout, header, navbar, and footer
   ============================================ */

:root {
    --primary-color: #2061a8;
    --primary-hover: #1a4f8a;
    --dark-bg: #343a40;
    --light-text: #f8f9fa;
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --box-shadow: 10px 10px 31px -13px rgba(0, 0, 0, 0.75);
    --header-height: 80px;
    --max-width: 1250px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    width: 100%;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
}

.main-navbar {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 1px;
    border-bottom: 0px !important;
    box-shadow: var(--box-shadow);
}

.header-container {
    max-width: var(--max-width);
    height: var(--header-height);
    margin: 0 auto;
    background-image: url(/img/top-arcar.png);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}

/* Fallback background if image doesn't load */
.header-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    z-index: -1;
}

@media (max-width: 1280px) {
    .header-container {
        max-width: 100%;
        padding: 0 0.5rem !important;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 60px;
    }
    
    .main-navbar {
        margin-bottom: 0;
    }
}

/* ============================================
   NAVBAR
   ============================================ */
.main-navbar {
    padding: 0;
    font-size: 1.125rem;
}

.navbar-brand {
    padding: 0.5rem 0;
}

.navbar-brand img {
    height: 60px;
    width: auto;
    transition: transform var(--transition-speed) ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .navbar-brand img {
        height: 40px;
    }
}

.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-link {
    color: white !important;
    padding: 0.75rem 1rem;
    transition: all var(--transition-speed) ease;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 400;
    font-size: 1.125rem;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: white;
    transition: all var(--transition-speed) ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
}

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

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    outline: 2px solid white;
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5rem;
    height: 1.5rem;
}

/* ============================================
   SKIP LINK - ACCESSIBILITY
   ============================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 var(--border-radius) 0;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   LOGIN PARTIAL - MODERNIZED
   ============================================ */
.login-section {
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    color: white;
    height: 87px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

.promo-link {
    color: #ffffff !important;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    line-height: 1.4;
}

.promo-link:hover {
    color: #dcdcdc !important;
    text-decoration: none;
    transform: translateY(-1px);
}

.promo-title {
    font-size: 0.9rem;
}

.promo-subtitle {
    font-size: 0.75rem;
    font-weight: normal;
    color: #e0e0e0;
}

.auth-links {
    text-align: right;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

.auth-links a {
    color: white !important;
    text-decoration: none;
    font-size: 0.975rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    transition: all var(--transition-speed) ease;
}

.auth-links a:hover {
    color: #4dd0e1 !important;
    text-decoration: none;
}

.auth-separator {
    margin: 0 1rem;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .login-section {
        height: auto;
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .promo-link {
        font-size: 0.75rem;
    }
    
    .promo-title {
        font-size: 0.875rem;
    }
    
    .promo-subtitle {
        font-size: 0.65rem;
    }
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 15px;
}

main {
    min-height: calc(100vh - 350px);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--dark-bg);
    color: var(--light-text);
    margin-top: 3rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

.footer-section {
    margin-bottom: 1.5rem;
}

.footer-description {
    font-style: italic;
    color: #adb5bd;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    list-style: none;
    padding: 0;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all var(--transition-speed) ease;
    color: var(--light-text);
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    color: white;
    text-decoration: none;
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--light-text);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: none;
    transform: translateX(5px);
}

.footer-highlight {
    font-size: 1.125rem;
    font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .footer-section {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
