/* layout.css
   Header, navigation, page header, CTA band, footer.
   Loaded on every page. */

/* ===== HEADER & NAVIGATION ===== */
header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 1px solid var(--border);
}

header .container {
    max-width: 1400px;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    z-index: 1001;
    transition: transform 0.3s ease;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: clamp(16px, 2vw, 24px);
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    transition: color 0.3s ease;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    position: relative;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

.dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--light);
    min-width: 200px;
    border-radius: 12px;
    overflow: hidden; /* keeps the hover highlight inside the rounded corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    margin-top: 5px;
}

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

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-bottom: 1px solid var(--border);
}

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

.dropdown-menu a:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.dropdown-menu a.active {
    background: rgba(var(--primary-light-rgb), 0.2);
    color: var(--primary);
}

.nav-buttons {
    display: flex;
    gap: clamp(12px, 2vw, 15px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.mobile-menu-btn:hover {
    color: var(--primary);
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(var(--primary-light-rgb), 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 64, 175, 0.3) 0%, transparent 50%);
    animation: float 10s ease-in-out infinite;
}

.cta-section h2 {
    color: white;
    margin-bottom: 2rem;
    font-size: clamp(2rem, 5vw, 3.5rem);
    position: relative;
    z-index: 2;
}

.cta-section p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: min(90%, 600px);
    margin: 0 auto 4rem;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.cta-buttons {
    display: flex;
    gap: clamp(15px, 2vw, 25px);
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.cta-section .btn-primary {
    background: linear-gradient(195deg, #ffffff 5%, var(--primary-light) 100%);
    color: var(--primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

.cta-section .btn-primary:hover {
    background: white;
    color: var(--primary-dark);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.cta-section .btn-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
}

.cta-section .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border: 2px solid white;
}

/* ===== PAGE HEADER ===== */
.page-header {
    padding-top: 160px;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, var(--light) 100%);
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 64, 175, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
    z-index: 1;
}

.page-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 20px;
    position: relative;
    z-index: 3;
}

.page-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-primary);
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-header p {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 3rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: min(90%, 700px);
    margin-left: auto;
    margin-right: auto;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    color: var(--text-primary);
    padding: clamp(60px, 8vw, 80px) 0 30px;
    position: relative;
    border-top: 1px solid var(--border);
}

footer .container {
    max-width: 1400px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: clamp(24px, 3vw, 40px);
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.footer-column h3 {
    color: var(--text-primary);
    margin-bottom: 30px;
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    font-weight: 700;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-about p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 30px;
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
}

.contact-info {
    margin-bottom: 30px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
}

.contact-info i {
    margin-right: 12px;
    color: var(--primary-light);
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--text-secondary);
    text-decoration: none;
}

.contact-info a:hover {
    color: var(--primary-light);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

.footer-bottom a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--text-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar {
        position: relative !important;
        z-index: 1001;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 104px;
        left: 0;
        right: 0;
        height: 406px;
        background: var(--light);
        flex-direction: column;
        padding: 30px 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        gap: 20px;
        border: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
        transform: translateZ(0);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: none;
        margin-left: 20px;
        margin-top: 10px;
    }

    .dropdown-menu a {
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-buttons {
        display: none;
        position: absolute;
        top: 480px;
        left: 0;
        right: 0;
        background: var(--light);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.3);
    }

    .nav-buttons.active {
        display: flex;
    }

    .nav-buttons .btn {
        width: 100%;
        text-align: center;
        margin: 5px 0;
        padding: 16px 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
}
