/* ============================================================
   COMMON.CSS - Shared styles for all pages
   ============================================================ */

/* === CSS CUSTOM PROPERTIES === */
:root {
    --black-color: #000000;
    --white-color: #ffffff;
    --outline-color: #F67E7E;
    --midnight-green: #014E56;
    --rapture-blue: #79C8C7;
    --police-blue: #2C6269;
    --deep-jungle-green: #004047;
    --sacramento-state-green: #012F34;
    --dark-green: #002529;
}

/* === GLOBAL RESETS === */
html {
    box-sizing: border-box;
    height: 100%;
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

*:focus {
    outline: 2px dashed var(--outline-color);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: var(--white-color);
}

h1, h2, h3, h4, p, hr {
    margin: 0;
}

button {
    color: var(--white-color);
}

svg {
    display: block;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0;
    margin: 0;
    font-family: "Livvic", "Arial", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
    background-color: var(--midnight-green);
    color: var(--white-color);
    overflow-x: hidden;
}

/* === UTILITIES === */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1150px;
    padding-left: 20px;
    padding-right: 20px;
    margin-left: auto;
    margin-right: auto;
}

/* === PAGE LOADER === */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-green);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.page-loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--rapture-blue);
    border-top-color: var(--outline-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.page-loader-text {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--rapture-blue);
    opacity: 0.8;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === HEADER === */
.site-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    padding-bottom: 129px;
}

.site-nav {
    display: flex;
    align-items: center;
}

.site-nav-list {
    display: flex;
    align-items: center;
    margin-left: 40px;
}

.site-header-logo img:hover {
    opacity: 0.8;
}

.site-nav-item {
    margin-left: 40px;
}

.site-nav-link {
    transition: color 0.3s ease;
}

.site-nav-link:hover {
    color: var(--outline-color);
}

.site-nav-link.active {
    color: var(--outline-color);
}

.site-header-contact-button {
    padding: 8px 28px;
    border: 2px solid var(--white-color);
    text-align: center;
    border-radius: 24px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.site-header-contact-button:hover {
    background-color: var(--white-color);
    color: var(--dark-green);
    border-color: var(--rapture-blue);
}

.site-header-contact-button.active {
    background-color: var(--white-color);
    color: var(--dark-green);
    border-color: var(--rapture-blue);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 100;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--white-color);
    margin-bottom: 5px;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle span:last-child {
    margin-bottom: 0;
}

.mobile-menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* === CTA SECTION === */
.cta {
    background-color: var(--outline-color);
    padding-top: 76px;
    padding-bottom: 76px;
    position: relative;
}

.cta img {
    position: absolute;
    z-index: 1;
    left: calc(50% - 650px);
}

.cta-container {
    display: flex;
    align-items: center;
    width: 917px;
    justify-content: space-between;
}

.cta-container h2 {
    color: var(--sacramento-state-green);
    font-size: 48px;
    font-weight: 700;
    line-height: 48px;
}

.cta-container a {
    padding: 10px 32px;
    box-sizing: border-box;
    border-radius: 24px;
    border: 2px solid var(--sacramento-state-green);
    color: var(--sacramento-state-green);
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
}

.cta-container a:hover {
    border-color: transparent;
    background-color: var(--sacramento-state-green);
    color: var(--white-color);
}

/* === FOOTER === */
.site-footer {
    z-index: 2;
    background-color: var(--dark-green);
    padding-top: 48px;
    padding-bottom: 48px;
}

.site-footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-footer-half-part-wrapper {
    display: flex;
    align-items: center;
}

.site-footer-logo-wrapper img {
    margin-bottom: 25px;
}

.site-footer-logo-wrapper img:hover {
    opacity: 0.8;
}

.site-footer-logo-wrapper {
    margin-right: 125px;
}

.site-footer-nav ul {
    display: flex;
    align-items: center;
}

.site-footer-nav a {
    color: var(--white-color);
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
    transition: color 0.3s ease;
}

.site-footer-nav a:hover {
    color: var(--outline-color);
}

.site-footer-nav li:not(:last-child) {
    margin-right: 40px;
}

.site-footer-locations-wrapper p {
    cursor: pointer;
    color: var(--white-color);
    font-size: 20px;
    font-weight: 500;
    line-height: 25px;
    opacity: 0.6;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.site-footer-socials-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.socials-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
}

.socials-wrapper li:not(:last-child) {
    margin-right: 16px;
}

.socials-wrapper svg {
    color: var(--white-color);
    transition: color 0.3s ease;
}

.socials-wrapper svg:hover {
    color: var(--outline-color);
}

.site-footer-socials-wrapper p {
    color: var(--white-color);
    font-size: 17px;
    font-weight: 600;
    line-height: 25px;
    opacity: 0.6;
}

/* ============================================================
   RESPONSIVE - COMMON COMPONENTS
   ============================================================ */

/* Tablet */
@media (max-width: 768px) {
    .site-header-container {
        padding-bottom: 60px;
    }

    .site-nav-list {
        margin-left: 20px;
    }

    .site-nav-item {
        margin-left: 20px;
    }

    .cta {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .cta > img {
        display: none;
    }

    .cta-container {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .cta-container h2 {
        font-size: 32px;
        line-height: 40px;
    }

    .site-footer-container {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .site-footer-half-part-wrapper {
        flex-direction: column;
        gap: 24px;
    }

    .site-footer-logo-wrapper {
        margin-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .site-footer-socials-wrapper {
        align-items: center;
    }

    .socials-wrapper {
        margin-bottom: 24px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .mobile-menu-toggle {
        display: block;
    }

    .site-header-container {
        flex-wrap: wrap;
        padding-bottom: 40px;
        position: relative;
    }

    .site-nav {
        width: 100%;
        justify-content: space-between;
    }

    .site-nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--police-blue);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-left: 0;
        z-index: 99;
        transition: right 0.3s ease;
        gap: 24px;
    }

    .site-nav-list.open {
        right: 0;
    }

    .site-nav-item {
        margin-left: 0;
    }

    .site-nav-link {
        font-size: 20px;
    }

    .site-header-contact-button {
        position: fixed;
        bottom: -100%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 100;
        transition: bottom 0.3s ease;
    }

    .site-header-contact-button.mobile-visible {
        bottom: 60px;
    }

    .cta-container h2 {
        font-size: 24px;
        line-height: 32px;
    }

    .site-footer-nav li:not(:last-child) {
        margin-right: 24px;
    }
}
