/* ==========================================
   SHARED CSS - Common styles for all pages
   ========================================== */

/* ==========================================
   CSS VARIABLES
   ========================================== */

:root {
    --color-primary: #F9F6E5;
    --color-accent: #BC2806;
    --color-teal: #159EB5;
    --color-teal-hover: #1a9ab8;
    --color-dark: #020202;
    --color-dark-bg: #1A1C1C;
    --bg-overlay: rgba(51, 43, 19, 0.4);
    --bg-overlay-hover: rgba(51, 43, 19, 0.7);
    --bg-overlay-active: #332B13;
    --font-main: 'Bebas', sans-serif;
    --gradient-teal: linear-gradient(135deg, rgba(0, 58, 67, 1) 0%, rgba(17, 100, 113, 1) 75%, rgba(0, 97, 112, 1) 100%);
}

/* ==========================================
   CSS RESET
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

#page {
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================
   BURGER MENU MOBILE STYLES
   ========================================== */

@media (max-width: 768px) {
    .header__contacts {
        z-index: 1;
    }

    .header__telephone {
        pointer-events: none;
    }

    .header__telephone a {
        pointer-events: auto;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: auto;
        height: auto;
        z-index: 1000;
    }

    .nav__humburger {
        position: fixed;
        top: 15px;
        right: 15px;
        width: 32px;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0;
        cursor: pointer;
        z-index: 1001;
    }

    .nav__humburger::before {
        display: none;
    }

    .nav__humburger__line {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #f9f6e5;
        margin-bottom: 6px;
        transition: margin .2s, transform .3s, opacity .3s;
    }

    .nav__humburger__line:last-child {
        margin-bottom: 0;
    }

    .nav__humburger__line_open {
        margin-bottom: 0;
    }

    .nav__humburger__line_open:first-child {
        transform: rotate(-45deg) !important;
        margin-top: 10px;
    }

    .nav__humburger__line_open:nth-child(2) {
        opacity: 0;
    }

    .nav__humburger__line_open:last-child {
        transform: rotate(45deg) !important;
        margin-top: -6px;
    }

    .nav__nav {
        position: fixed;
        top: 0;
        right: 0;
        transform: translateX(100%);
        transition: transform 0.35s ease;
    }

    .nav_open .nav__nav {
        transform: translateX(0);
    }

    .nav__humburger_open {
        transform: translateX(-228px);
    }

    /* Hide desktop elements */
    .header__ntw {
        display: none !important;
    }

    .header__telephone__title {
        display: none !important;
    }

    /* Mobile header styles */
    .header__contacts {
        padding-top: 15px !important;
        font-size: 14px !important;
    }

    .header__logo {
        width: 80px !important;
        top: 10px !important;
        margin-left: 15px !important;
        left: 0 !important;
    }

    .header__logo__img {
        width: 80px !important;
        height: auto !important;
    }

    .header__telephone {
        padding: 0 !important;
        margin-right: 50px !important;
    }
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    padding: 50px 0;
    background: #FFFFFF;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-info {
    align-items: flex-end;
    gap: 6px;
    width: 152px;
}

.footer-info p {
    font-family: var(--font-main);
    font-size: 22px;
    font-weight: 400;
    line-height: 1em;
    color: var(--color-dark);
}

.footer-divider {
    width: 2px;
    height: 162px;
    background: var(--color-dark);
}

.footer-logo {
    align-items: center;
    gap: 12px;
    width: 203px;
    height: 162px;
}

.footer-logo img {
    width: 100%;
    height: 107px;
    object-fit: contain;
}

.footer-line {
    width: 100%;
    height: 2px;
    background: var(--color-dark);
    border: none;
    margin: 0;
}

.footer-since {
    font-family: var(--font-main);
    font-size: 28px;
    font-weight: 400;
    line-height: 1em;
    color: #000000;
    text-align: center;
}

.footer-social {
    align-items: center;
    gap: 5px;
    width: 210px;
}

.footer-social-text {
    font-family: var(--font-main);
    font-size: 22px;
    font-weight: 400;
    line-height: 1em;
    color: var(--color-dark);
    text-align: center;
}

.footer-instagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.footer-instagram img {
    width: 100%;
    height: auto;
}

/* Footer Tablet */
@media (max-width: 1199px) {
    .footer {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .footer-divider {
        width: 80%;
        height: 2px;
    }
}

/* Footer Mobile */
@media (max-width: 767px) {
    .footer {
        flex-direction: column;
        align-items: center;
        padding: 32px 16px;
        gap: 16px;
    }

    .footer-social {
        order: 1;
        width: 210px;
        gap: 5px;
    }

    .footer-social-text {
        font-size: 22px;
        text-align: center;
    }

    .footer-instagram {
        width: 100%;
    }

    .footer-section {
        order: 2;
        width: 100%;
    }

    .footer-info {
        align-items: flex-end;
        width: auto;
        gap: 6px;
    }

    .footer-info p {
        font-size: 16px;
    }

    .footer-divider {
        width: 2px;
        height: 162px;
    }

    .footer-logo {
        width: auto;
        align-items: center;
    }

    .footer-logo img {
        width: 133px;
        height: auto;
    }

    .footer-since {
        font-size: 20px;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--color-teal);
    outline-offset: 2px;
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
