/* layout.css */
/* Header Styles */
.main-header {
    background: linear-gradient(0.25turn, #2f2a4b, #5f547d, #a27c9c, #e5a4ab, #f7c6b6);
    color: var(--text-light);
    padding: 1.5rem 0 0 0;
    box-shadow: 0 4px 20px rgba(47, 42, 75, 0.15);
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.08)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    min-height: 120px;
}

.logo {
    flex: 1;
    text-align: center;
    margin-top: 1rem;
}

.logo h1 {
    font-size: 2.75rem;
    margin-bottom: 0.25rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.logo p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-style: italic;
}

/* MOGenWeb logo styling - Fixed size */
.mogenweb-logo {
    width: 159px;
    height: 159px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    align-self: flex-start;
}

.mogenweb-logo:hover { opacity: 1; }

/* USGenWeb Image */
.usgenweb-logo {
    width: 173px !important;
    height: 103px !important;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    align-self: flex-start;
    position: relative !important;
    top: 40px !important;  /* Use relative positioning instead of margin */
}

.usgenweb-logo:hover { opacity: 1; }

/* Navigation Styles - Positioned at far right bottom */
.main-nav {
    position: absolute;
    bottom: 0;
    right: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.nav-item { position: relative; }

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.6rem 0.8rem;
    border-radius: 6px 6px 0 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-bottom: none;
    font-size: 0.9rem;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 42, 75, 0.2);
}

/* Arrow styling for dropdown indicators */
.arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown.active .arrow { transform: rotate(180deg); }

/* Dropdown Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(15px);
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(47, 42, 75, 0.2);
    border-radius: 0 6px 6px 6px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.3);
}

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

/* Active nav link styling */
.nav-link.active {
    background-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 42, 75, 0.2);
}

.dropdown-menu li { border-bottom: 1px solid rgba(224, 212, 216, 0.5); }

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

.dropdown-menu a {
    color: var(--text-dark);
    padding: 0.4rem 0.75rem;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 400;
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: linear-gradient(135deg, var(--accent-peach), var(--accent-pink));
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 0.5rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    transition: background 0.3s ease;
    border: none;
    position: absolute;
    top: 1rem;
    right: 2rem;
    z-index: 1001;
}

.mobile-menu-toggle:hover { background: rgba(255,255,255,0.2); }

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: 0.3s;
    border-radius: 2px;
}

/* Main Content Layout */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr 200px;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-medium);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(47, 42, 75, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(47, 42, 75, 0.4);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-light);
    border-top: 2px solid var(--primary-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Footer Styles */
.main-footer {
    background: var(--primary-dark);
    color: var(--text-light);
    padding: 15px 0 3rem 0;  /* Combined: top=15px, right=0, bottom=3rem, left=0 */
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 0;  /* Removed !important since it's not conflicting now */
}
.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(95, 84, 125, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(162, 124, 156, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.footer-info {
    margin-bottom: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

.footer-info p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.footer-links {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1rem;
    text-align: center;
}

.footer-links a, .footer-info p a {
    color: var(--accent-peach);
    text-decoration: none;
    margin: 0 0.75rem;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.footer-links a:hover, .footer-info p a:hover {
    color: var(--text-light);
    background: rgba(247, 198, 182, 0.2);
    text-decoration: none;
}
