/* ===== Variables ===== */
:root {
    --gold: #C5A028;
    --gold-dark: #A38520;
    --gold-light: #D4B445;
    --dark: #1A1A2E;
    --dark-secondary: #16213E;
    --light: #F5F5F0;
    --white: #FFFFFF;
    --text: #2D2D2D;
    --text-muted: #666666;
    --text-light: #CCCCCC;
    --green: #27AE60;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    --radius: 12px;
    --transition: 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Rubik', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

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

img, svg {
    max-width: 100%;
}

/* ===== Skip Link ===== */
.skip-link {
    position: absolute;
    top: -100%;
    right: 16px;
    background: var(--gold);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    font-weight: 600;
}
.skip-link:focus {
    top: 0;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background var(--transition);
}

.header.scrolled {
    background: rgba(26, 26, 46, 0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--gold);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition);
}

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

.nav-link:hover::after {
    width: 100%;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-weight: 600;
    font-size: 1.05rem;
    transition: color var(--transition);
}

.header-phone svg {
    width: 18px;
    height: 18px;
}

.header-phone:hover {
    color: var(--gold-light);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.btn-primary:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 160, 40, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark);
    transform: translateY(-2px);
}

.btn-dark {
    background: var(--dark);
    color: var(--white);
    border-color: var(--dark);
}

.btn-dark:hover {
    background: var(--dark-secondary);
    border-color: var(--dark-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 26, 46, 0.4);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-secondary) 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(197, 160, 40, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(22, 33, 62, 0.5) 0%, transparent 50%);
}

.hero-road {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #111;
    display: flex;
    justify-content: center;
    gap: 40px;
    align-items: center;
}

.road-line {
    width: 60px;
    height: 4px;
    background: var(--gold);
    opacity: 0.5;
    border-radius: 2px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 20px 100px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Sections ===== */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--light);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gold);
    margin: 16px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

/* ===== Service Cards ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px 28px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--gold);
    transition: all var(--transition);
    text-align: center;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.card-icon svg {
    width: 30px;
    height: 30px;
    stroke: var(--white);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ===== Features ===== */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.feature {
    text-align: center;
}

.feature-icon {
    width: 72px;
    height: 72px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow);
}

.feature-icon svg {
    width: 34px;
    height: 34px;
    stroke: var(--gold);
}

.feature h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.feature p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===== About ===== */
.about-text {
    max-width: 750px;
    margin: 40px auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-muted);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== CTA Banner ===== */
.cta-banner {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    padding: 70px 0;
    text-align: center;
}

.cta-banner h2 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 20px;
}

.cta-phone {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 30px;
    direction: ltr;
    unicode-bidi: bidi-override;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: var(--text-light);
    padding: 50px 0 30px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.footer-brand p {
    color: var(--text-light);
    margin-bottom: 6px;
}

.footer-brand a {
    color: var(--gold);
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-light);
    transition: color var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-copy {
    width: 100%;
    text-align: center;
    padding-top: 30px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
}

/* ===== Floating Call Button ===== */
.fab-call {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 60px;
    height: 60px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(197, 160, 40, 0.5);
    z-index: 999;
    transition: all var(--transition);
    animation: pulse 2s infinite;
}

.fab-call svg {
    width: 26px;
    height: 26px;
    stroke: var(--white);
}

.fab-call:hover {
    background: var(--gold-dark);
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(197, 160, 40, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(197, 160, 40, 0); }
    100% { box-shadow: 0 0 0 0 rgba(197, 160, 40, 0); }
}

/* ===== Focus Styles ===== */
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .features {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 72px;
        right: 0;
        left: 0;
        background: var(--dark);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 0;
        transform: translateY(-120%);
        transition: transform var(--transition);
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    }

    .nav.open {
        transform: translateY(0);
    }

    .nav-link {
        padding: 14px 20px;
        width: 100%;
        text-align: center;
        font-size: 1.1rem;
    }

    .header-phone span {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .stats {
        flex-direction: column;
        gap: 30px;
    }

    .cta-phone {
        font-size: 2.2rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.7rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .card {
        padding: 28px 20px;
    }

    .cta-phone {
        font-size: 1.8rem;
    }
}

/* ===== Accessibility Toolbar ===== */
.a11y-toolbar {
    position: fixed;
    bottom: 96px;
    left: 24px;
    z-index: 1001;
}

.a11y-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--dark);
    color: var(--white);
    border: 2px solid var(--gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.a11y-toggle svg {
    width: 26px;
    height: 26px;
}

.a11y-toggle:hover {
    background: var(--gold);
    transform: scale(1.1);
}

.a11y-panel {
    position: absolute;
    bottom: 60px;
    left: 0;
    background: var(--white);
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    width: 260px;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
}

.a11y-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.a11y-panel h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light);
}

.a11y-group {
    margin-bottom: 10px;
}

.a11y-group-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.a11y-buttons {
    display: flex;
    gap: 6px;
}

.a11y-buttons button {
    flex: 1;
    padding: 8px 4px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: var(--light);
    color: var(--text);
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}

.a11y-buttons button:hover {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.a11y-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    font-family: 'Rubik', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.a11y-option svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.a11y-option:hover {
    background: var(--light);
    border-color: var(--gold);
}

.a11y-option[aria-pressed="true"] {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.a11y-option[aria-pressed="true"] svg {
    stroke: var(--white);
    fill: var(--white);
}

.a11y-statement-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    padding: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-dark);
    text-decoration: underline;
}

.a11y-statement-link:hover {
    color: var(--gold);
}

/* ===== Accessibility Modes ===== */

/* High Contrast */
body.a11y-high-contrast {
    background: #000 !important;
    color: #fff !important;
}
body.a11y-high-contrast .header {
    background: #000 !important;
    border-bottom: 2px solid #ff0 !important;
}
body.a11y-high-contrast .section,
body.a11y-high-contrast .section-alt,
body.a11y-high-contrast .card,
body.a11y-high-contrast .feature-icon {
    background: #000 !important;
    color: #fff !important;
}
body.a11y-high-contrast .card {
    border: 2px solid #ff0 !important;
}
body.a11y-high-contrast .card h3,
body.a11y-high-contrast .card p,
body.a11y-high-contrast .feature h3,
body.a11y-high-contrast .feature p,
body.a11y-high-contrast .section-title,
body.a11y-high-contrast .section-subtitle,
body.a11y-high-contrast .about-text,
body.a11y-high-contrast .stat-label {
    color: #fff !important;
}
body.a11y-high-contrast a {
    color: #ff0 !important;
}
body.a11y-high-contrast .btn-primary,
body.a11y-high-contrast .btn-dark {
    background: #ff0 !important;
    color: #000 !important;
    border-color: #ff0 !important;
}
body.a11y-high-contrast .btn-outline {
    border-color: #ff0 !important;
    color: #ff0 !important;
}
body.a11y-high-contrast .cta-banner {
    background: #333 !important;
}
body.a11y-high-contrast .footer {
    background: #111 !important;
    border-top: 2px solid #ff0 !important;
}
body.a11y-high-contrast .stat-number {
    color: #ff0 !important;
}
body.a11y-high-contrast .nav-link {
    color: #ff0 !important;
}
body.a11y-high-contrast .header-phone {
    color: #ff0 !important;
}

/* Highlight Links */
body.a11y-highlight-links a {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
    outline: 2px solid var(--gold) !important;
    outline-offset: 2px !important;
}

/* Grayscale */
body.a11y-grayscale {
    filter: grayscale(100%) !important;
}

/* Stop Animations */
body.a11y-stop-animations,
body.a11y-stop-animations *,
body.a11y-stop-animations *::before,
body.a11y-stop-animations *::after {
    animation: none !important;
    transition: none !important;
}
body.a11y-stop-animations html {
    scroll-behavior: auto !important;
}

/* ===== Accessibility Page ===== */
.accessibility-page {
    padding: 120px 0 60px;
}

.accessibility-page h1 {
    font-size: 2.2rem;
    color: var(--dark);
    margin-bottom: 30px;
    text-align: center;
}

.a11y-section {
    margin-bottom: 36px;
}

.a11y-section h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
}

.a11y-section p {
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 12px;
}

.a11y-section ul {
    padding-right: 24px;
    margin-bottom: 12px;
}

.a11y-section li {
    line-height: 1.9;
    margin-bottom: 8px;
    color: var(--text);
}

.a11y-section li ul {
    margin-top: 8px;
}

.a11y-section a {
    color: var(--gold-dark);
    text-decoration: underline;
    font-weight: 500;
}

.a11y-section a:hover {
    color: var(--gold);
}

.a11y-date {
    font-style: italic;
    color: var(--text-muted);
}

.a11y-back {
    text-align: center;
    margin-top: 40px;
}

/* ===== Forced Colors (Windows High Contrast) ===== */
@media (forced-colors: active) {
    .btn, .card, .feature-icon, .a11y-toggle, .a11y-option, .fab-call {
        border: 2px solid ButtonText;
    }
    .a11y-toggle, .fab-call {
        forced-color-adjust: none;
    }
}

/* ===== High Contrast Preference ===== */
@media (prefers-contrast: more) {
    :root {
        --text-muted: #444444;
        --text-light: #999999;
    }
    .card {
        border: 2px solid var(--dark);
    }
}

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

/* ===== Responsive Accessibility Toolbar ===== */
@media (max-width: 768px) {
    .a11y-toolbar {
        bottom: 90px;
        left: 16px;
    }
    .a11y-toggle {
        width: 44px;
        height: 44px;
    }
    .a11y-panel {
        width: 240px;
    }
}
