/**
 * PCMA Isotopes Database - Header & Footer Styles
 *
 * @author Nika Chavleishvili
 * @copyright 2026 Nika Chavleishvili
 * @license MIT
 *
 * Award-winning design with elegant styling
 */

/* ========== SITE HEADER ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    padding: 1.5rem 3rem;
    background: rgba(10, 10, 10, 0.95);
    transition: all var(--transition-base);
}

.site-header.scrolled {
    background: rgba(10, 10, 10, 0.98);
    padding: 1rem 3rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.header-logo:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.header-logo-img {
    height: 130px;
    width: auto;
    max-width: 400px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.site-header.scrolled .header-logo-img {
    height: 85px;
}

/* Header Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-nav-link {
    position: relative;
    padding: 0.6rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color var(--transition-base);
    border-radius: var(--radius-sm);
}

.header-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.4rem;
    left: 1.25rem;
    right: 1.25rem;
    height: 1px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-base);
}

.header-nav-link:hover {
    color: var(--color-text);
}

.header-nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.header-nav-link--cta {
    /* Gradient button style */
    background: linear-gradient(180deg,
            var(--color-accent-light) 0%,
            var(--color-accent) 50%,
            var(--color-accent-dark) 100%);
    color: var(--color-white);
    border-radius: 9px;
    padding: 0.6rem 1.5rem;
    margin-left: 0.5rem;
    font-weight: 700;
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.1),
        0 2px 8px 0 rgba(193, 122, 92, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.header-nav-link--cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.15) 50%,
            transparent 100%);
    transition: left 0.4s ease;
}

.header-nav-link--cta::after {
    display: none;
}

.header-nav-link--cta:hover {
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.15),
        0 4px 12px 0 rgba(193, 122, 92, 0.4);
}

.header-nav-link--cta:hover::before {
    left: 100%;
}

/* ========== SITE FOOTER ========== */
.site-footer {
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-primary) 100%);
    border-top: 1px solid var(--color-border);
    padding: 4rem 2rem 2rem;
    margin-top: 0;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--color-border);
}

/* Footer Brand Section */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.footer-logos {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
}

.footer-logo-link {
    display: block;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.footer-logo-link:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.footer-logo {
    width: 100%;
    max-width: 500px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: transform var(--transition-base);
}

/* Sponsor Logo in Footer Brand - Aligned with top logos */
.footer-sponsor-link {
    display: block;
    align-self: flex-start;
    margin-left: 45px;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-sm);
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.footer-sponsor-link:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

.footer-sponsor-logo {
    display: block;
    width: auto;
    height: 65px;
    object-fit: contain;
}

.footer-tagline {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 300px;
}

/* Footer Content Section */
.footer-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Footer Contact Section */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-offices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.footer-office-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-office-title {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
    margin: 0;
}

.footer-office-subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.footer-phone {
    margin: 0;
    margin-top: 0.5rem;
}

.footer-phone a {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-base);
}

.footer-phone a:hover {
    color: var(--color-accent-light);
}

.footer-heading {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-list a {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-base), transform var(--transition-base);
    display: inline-block;
}

.footer-list a:hover {
    color: var(--color-text);
    transform: translateX(4px);
}

/* Footer Address */
.footer-address {
    font-style: normal;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-top: 0.25rem;
}

.footer-address p {
    margin: 0;
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    gap: 2rem;
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--color-text-subtle);
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    font-size: 0.85rem;
    color: var(--color-text-subtle);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

/* Footer Developer Credit */
.footer-developer {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.footer-developer p {
    font-size: 0.8rem;
    color: var(--color-text-subtle);
    margin: 0;
    font-family: var(--font-sans);
    letter-spacing: 0.02em;
}

.footer-developer .developer-name {
    color: var(--color-accent);
    font-weight: 500;
    transition: color var(--transition-base);
}

.footer-developer:hover .developer-name {
    color: var(--color-accent-light);
}

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 1200px) {
    .footer-content {
        gap: 3rem;
    }

    .footer-offices-grid {
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-brand {
        align-items: center;
        text-align: center;
    }

    .footer-logos {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }

    .footer-sponsor-link {
        margin-left: 0;
        align-self: center;
    }

    .footer-tagline {
        max-width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr 2fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 0.625rem 1rem;
    }

    .header-container {
        gap: 1rem;
    }

    .header-logo-img {
        height: 70px;
        max-width: 280px;
    }

    .site-header.scrolled {
        padding: 0.5rem 1rem;
    }

    .site-header.scrolled .header-logo-img {
        height: 55px;
    }

    .header-nav {
        gap: 0.25rem;
    }

    .header-nav-link {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }

    .header-nav-link--cta {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
        margin-left: 0.25rem;
    }

    .site-footer {
        padding: 2.5rem 1.25rem 1.5rem;
    }

    .footer-main {
        gap: 2rem;
        padding-bottom: 2rem;
    }

    .footer-brand {
        gap: 1rem;
    }

    .footer-logos {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .footer-sponsor-link {
        margin-left: 0;
        align-self: center;
    }

    .footer-logo {
        max-width: 350px;
    }

    .footer-tagline {
        font-size: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-heading {
        font-size: 0.8rem;
    }

    .footer-list a {
        font-size: 0.9rem;
    }

    .footer-offices-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .footer-office-title {
        font-size: 0.875rem;
    }

    .footer-address {
        font-size: 0.8rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding-top: 1.5rem;
    }

    .footer-copyright {
        font-size: 0.8rem;
    }

    .footer-legal {
        gap: 1.5rem;
    }

    .footer-legal a {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 0.5rem 0.75rem;
    }

    .header-container {
        gap: 0.5rem;
    }

    .header-logo-img {
        height: 50px;
        max-width: 200px;
    }

    .site-header.scrolled .header-logo-img {
        height: 45px;
    }

    /* Hide text nav links on small phones, keep only CTA */
    .header-nav-link:not(.header-nav-link--cta) {
        display: none;
    }

    .header-nav-link--cta {
        font-size: 0.7rem;
        padding: 0.5rem 0.75rem;
        margin-left: 0;
        border-radius: 8px;
    }

    .site-footer {
        padding: 2rem 1rem 1.25rem;
    }

    .footer-main {
        gap: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .footer-logo {
        max-width: 280px;
    }

    .footer-tagline {
        font-size: 0.9rem;
    }

    .footer-offices-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .footer-bottom {
        gap: 0.75rem;
        padding-top: 1.25rem;
    }
}

/* Reduced motion preference - disable animations for accessibility */
@media (prefers-reduced-motion: reduce) {
    /* Animations disabled for accessibility */
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .header-nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .header-nav-link--cta {
        min-height: 44px;
    }

    .footer-list a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .footer-legal a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Disable hover effects on touch */
    .header-nav-link:hover::after {
        transform: scaleX(0);
    }

    .header-nav-link--cta:hover {
        transform: none;
    }
}

/* Landscape phone orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .site-header {
        padding: 0.375rem 1rem;
    }

    .header-logo-img {
        height: 45px;
    }

    .site-header.scrolled .header-logo-img {
        height: 40px;
    }
}