/*
 * Shared responsive and theme-safe rules.
 * Loaded after each page's inline styles so all pages behave consistently.
 */
:root {
    color-scheme: light;
}

html,
body {
    max-width: 100%;
}

body {
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

img,
svg,
video,
iframe {
    max-width: 100%;
}

img:not(.logo-img) {
    height: auto;
}

/* Keep the brand mark adaptable against every page and theme. */
.logo-img,
body.dark-mode .logo-img {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
}

/* Shared action styling keeps links and form buttons consistent across pages. */
.cta-button,
.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.8rem 1.35rem;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(181, 18, 27, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cta-button:hover,
.submit-button:hover,
.cta-button:focus-visible,
.submit-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(181, 18, 27, 0.28);
}

.cta-button:focus-visible,
.submit-button:focus-visible {
    outline: 3px solid rgba(224, 27, 36, 0.45);
    outline-offset: 3px;
}

.testimonial {
    background: transparent !important;
    border: 0;
    border-top: 1px solid var(--border, rgba(148, 163, 184, 0.28));
    border-radius: 0;
    box-shadow: none !important;
}

.testimonial:hover,
.testimonial:focus-within {
    transform: none !important;
    box-shadow: none !important;
}

body.dark-mode .testimonial {
    background: transparent !important;
}

.page-hero,
.hero-slide {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.slider {
    overflow: hidden;
}

.slider img,
.photo-card img {
    object-fit: cover;
    object-position: center center;
}

.photo-card {
    overflow: hidden;
}

.photo-card img {
    width: 100%;
    height: 100%;
    display: block;
}

h1,
h2,
h3,
h4,
p,
li,
a,
button,
input,
textarea,
select,
label {
    overflow-wrap: anywhere;
}

body.dark-mode {
    color-scheme: dark;
}

body.dark-mode header,
body.dark-mode nav {
    background: var(--surface-strong, #20262c) !important;
    border-color: var(--border, rgba(255, 255, 255, 0.1)) !important;
}

.logo:focus-visible,
.mobile-menu:focus-visible,
nav a:focus-visible {
    outline: 3px solid var(--accent, #e01b24);
    outline-offset: 3px;
}

body.dark-mode main,
body.dark-mode section,
body.dark-mode article,
body.dark-mode aside,
body.dark-mode .container,
body.dark-mode .section-title,
body.dark-mode .faq-intro,
body.dark-mode .story,
body.dark-mode .address-section {
    color: var(--text, #f4f7fb);
}

body.dark-mode p,
body.dark-mode li,
body.dark-mode label,
body.dark-mode small,
body.dark-mode .section-title p,
body.dark-mode .faq-intro p,
body.dark-mode .story p,
body.dark-mode .contact-info p,
body.dark-mode .contact-box p,
body.dark-mode .price-note,
body.dark-mode .last-updated {
    color: var(--muted, #d6dce5) !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode strong,
body.dark-mode th,
body.dark-mode .section-title h2,
body.dark-mode .faq-question,
body.dark-mode .testimonial h3,
body.dark-mode .address-section h2 {
    color: var(--text, #f4f7fb);
}

body.dark-mode a:not(.cta-button):not(.whatsapp-button),
body.dark-mode nav a,
body.dark-mode footer a {
    color: var(--text, #f4f7fb);
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    color: var(--text, #f4f7fb);
    background: var(--surface-strong, #20262c);
    border-color: var(--border, rgba(255, 255, 255, 0.1));
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: var(--muted, #d6dce5);
    opacity: 0.85;
}

body.dark-mode .site-footer,
body.dark-mode footer {
    color: var(--muted, #d6dce5);
    background: #10151a;
}

body.dark-mode .site-footer h3,
body.dark-mode footer h3,
body.dark-mode .site-footer strong {
    color: var(--text, #f4f7fb);
}

body.dark-mode .site-footer a:hover,
body.dark-mode footer a:hover {
    color: var(--accent, #fca5a5);
}

/* Ensure card content remains readable when page-level styles use fixed colors. */
body.dark-mode .vmv-card,
body.dark-mode .service-card,
body.dark-mode .price-card,
body.dark-mode .info-card,
body.dark-mode .team-card,
body.dark-mode .work-box,
body.dark-mode .testimonial,
body.dark-mode .faq-item,
body.dark-mode .form-card,
body.dark-mode .contact-box,
body.dark-mode .notice,
body.dark-mode .term,
body.dark-mode .photo-card {
    color: var(--text, #f4f7fb);
    background-color: var(--surface-strong, #20262c);
    border-color: var(--border, rgba(255, 255, 255, 0.1));
}

body.dark-mode .vmv-card *,
body.dark-mode .service-card *,
body.dark-mode .price-card *,
body.dark-mode .info-card *,
body.dark-mode .team-card *,
body.dark-mode .work-box *,
body.dark-mode .testimonial *,
body.dark-mode .faq-item *,
body.dark-mode .form-card *,
body.dark-mode .contact-box *,
body.dark-mode .notice *,
body.dark-mode .term *,
body.dark-mode .photo-card * {
    border-color: var(--border, rgba(255, 255, 255, 0.1));
}

body.dark-mode .vmv-card p,
body.dark-mode .service-card p,
body.dark-mode .price-card p,
body.dark-mode .info-card p,
body.dark-mode .team-card p,
body.dark-mode .work-box li,
body.dark-mode .testimonial p,
body.dark-mode .faq-answer,
body.dark-mode .form-card > p,
body.dark-mode .contact-box p,
body.dark-mode .notice p,
body.dark-mode .term p,
body.dark-mode .photo-card figcaption {
    color: var(--muted, #d6dce5) !important;
}

body.dark-mode .vmv-card h3,
body.dark-mode .service-card h3,
body.dark-mode .price-card h3,
body.dark-mode .info-card h3,
body.dark-mode .team-card h3,
body.dark-mode .work-box h3,
body.dark-mode .testimonial h3,
body.dark-mode .faq-question,
body.dark-mode .form-card h2,
body.dark-mode .contact-box h2,
body.dark-mode .notice h3,
body.dark-mode .term h2,
body.dark-mode .photo-card h3 {
    color: var(--text, #f4f7fb) !important;
}

body.dark-mode .trust-box {
    background: var(--surface, #1a2027);
    color: var(--text, #f4f7fb);
    border-color: var(--border, rgba(255, 255, 255, 0.1));
}

body.dark-mode .trust-stat {
    background: var(--surface-strong, #20262c);
    border-color: var(--border, rgba(255, 255, 255, 0.1));
}

body.dark-mode .trust-stat strong,
body.dark-mode .trust-stat span,
body.dark-mode .trust-areas,
body.dark-mode .trust-areas strong {
    color: var(--text, #f4f7fb) !important;
}

/* Contact details stay readable and compact on small screens in either theme. */
.contact-info {
    color: #ffffff;
}

.contact-info > p {
    max-width: 46rem;
}

.contact-item {
    align-items: flex-start;
    min-width: 0;
}

.contact-item > div {
    min-width: 0;
}

.contact-item h4 {
    color: #ffffff;
}

.contact-item p,
.contact-item a {
    color: #ffe1e3;
    overflow-wrap: anywhere;
}

body.dark-mode .contact-info {
    background: linear-gradient(135deg, #7f1d1d, #b91c1c);
    color: #ffffff;
}

body.dark-mode .contact-item {
    color: #ffffff;
}

body.dark-mode .contact-item h4,
body.dark-mode .contact-item p,
body.dark-mode .contact-item a {
    color: #ffffff !important;
}

body.dark-mode .contact-item {
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.8);
}

body.dark-mode .contact-item i {
    color: #fda4af;
}

/* Keep footer navigation together and place contact details beneath it. */
.site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px 36px;
}

.site-footer-grid > .site-footer-col:first-child {
    grid-column: 1 / -1;
    justify-self: center;
}

.site-footer-grid > .site-footer-col:nth-child(2),
.site-footer-grid > .site-footer-col:nth-child(3) {
    min-width: 0;
    width: 100%;
    text-align: left;
}

.site-footer-grid > .site-footer-col:last-child {
    grid-column: 1 / -1;
    width: min(100%, 520px);
    margin: 0 auto;
    padding-top: 4px;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.site-footer-grid > .site-footer-col:last-child .site-footer-contact {
    width: min(100%, 390px);
    margin: 0 auto;
    text-align: center;
}

.site-footer-grid > .site-footer-col:last-child .site-footer-contact p {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.site-footer-grid > .site-footer-col:last-child .site-footer-contact span {
    text-align: center;
}

.site-footer-bottom {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
}

/* Keep the About page's final statement visually connected to its content. */
.how-we-work {
    padding-bottom: 24px;
}

.how-we-work + .quote {
    padding-top: 48px;
    margin-top: 0;
}

.quote + .site-footer {
    margin-top: 0;
}

.site-footer-grid > .site-footer-col:last-child h3 {
    margin-top: 12px;
}

.site-footer-social {
    justify-content: center;
}

@media (max-width: 900px) {
    .header-container {
        width: min(92%, 1200px);
        min-height: 72px !important;
        gap: 10px !important;
    }

    .logo {
        min-width: 0;
        max-width: calc(100% - 54px);
    }

    .logo-img {
        width: auto;
        height: 70px !important;
        max-width: min(220px, calc(100vw - 92px)) !important;
    }

    .mobile-menu {
        display: grid !important;
        place-items: center;
        flex: 0 0 44px;
        width: 44px;
        min-height: 44px;
        border: 0;
        border-radius: 14px;
        background: rgba(181, 18, 27, 0.08);
        color: var(--primary);
        cursor: pointer;
        transition: transform 0.2s ease, background-color 0.2s ease;
    }

    .mobile-menu:hover,
    .mobile-menu:focus-visible {
        background: rgba(181, 18, 27, 0.16);
        transform: translateY(-1px);
    }

    nav,
    body.dark-mode nav {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        display: none !important;
        padding: 0 !important;
        background: var(--surface-strong, #fff) !important;
        border-top: 1px solid var(--border) !important;
        box-shadow: 0 12px 28px var(--shadow, rgba(15, 23, 42, 0.12));
    }

    nav.active {
        display: block !important;
    }

    nav ul {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 8px 20px 14px !important;
    }

    nav a {
        display: block;
        padding: 11px 0;
        font-size: 15px;
        white-space: normal;
    }

    .header-container > .cta-button {
        display: none !important;
    }

    .page-hero {
        margin-top: 72px;
        padding: clamp(72px, 14vw, 110px) 0;
    }

    .page-hero h1 {
        font-size: clamp(2rem, 8vw, 3.2rem);
    }

    .page-hero p {
        font-size: clamp(0.95rem, 3vw, 1.1rem);
    }
}

@media (max-width: 600px) {
    .container {
        width: calc(100% - 32px);
    }

    section {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .hero,
    .page-hero {
        margin-top: 72px;
    }

    .hero-buttons,
    .hero-buttons .cta-button,
    .cta-section .cta-button,
    .trust-button,
    .submit-button {
        width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-button,
    .submit-button,
    .trust-button {
        min-height: 50px;
        padding-inline: 1rem;
    }

    .footer-grid,
    .services-grid,
    .pricing-grid,
    .info-grid,
    .vmv-grid,
    .testimonial-grid,
    .work-grid,
    .team-grid {
        grid-template-columns: 1fr !important;
    }

    .site-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .site-footer-shell {
        width: calc(100% - 32px);
        padding-left: 0;
        padding-right: 0;
    }

    .site-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .price-row {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    .form-card,
    .contact-box,
    .price-card,
    .info-card,
    .service-card,
    .testimonial,
    .work-box {
        max-width: 100%;
    }

    .hero-slide,
    .page-hero {
        background-position: center 35%;
    }

    .slider {
        height: clamp(260px, 72vw, 360px);
    }

    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px;
    }

    .photo-card {
        min-height: 0;
        aspect-ratio: 1 / 1.08;
        border-radius: 12px;
    }

    .photo-card figcaption {
        padding: 10px;
        font-size: 0.75rem;
        line-height: 1.35;
    }

    .contact-info {
        padding: 24px 16px !important;
    }

    .contact-info h2 {
        font-size: clamp(1.65rem, 7vw, 2rem);
        line-height: 1.2;
    }

    .contact-info > p {
        margin-bottom: 22px;
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .contact-item {
        gap: 12px;
        margin-bottom: 14px;
        padding: 14px 12px;
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.78);
    }

    .contact-item i {
        flex: 0 0 22px;
        width: 22px;
        font-size: 19px;
    }

    .contact-item h4 {
        margin-bottom: 3px;
        font-size: 1rem;
    }

    .contact-item p,
    .contact-item a {
        display: block;
        font-size: 0.9rem;
        line-height: 1.45;
    }
}

@media (max-width: 380px) {
    .container {
        width: calc(100% - 24px);
    }

    .logo-img {
        max-width: calc(100vw - 84px) !important;
    }

    .page-hero h1 {
        font-size: 1.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
