/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    overflow-y: scroll;
    scroll-behavior: smooth;
    /* Prevent iOS Safari from zooming on focus */
    -webkit-text-size-adjust: 100%;
    height: 100%;
}
body {
    font-family: 'Inter', sans-serif;
    color: #333;
    line-height: 1.6;
    background: #1a0a0a;
    position: relative;
    min-height: 100vh;
    min-height: 100%;
    /* Prevent horizontal scroll on mobile */
    overflow-x: hidden;
    width: 100%;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: url('img/background.jpg') center/cover no-repeat;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: rgba(30, 5, 5, 0.65);
    z-index: -1;
}

/* Modern browsers with dynamic viewport support */
@supports (height: 100dvh) {
    body::before,
    body::after {
        /* dvh adjusts automatically as browser chrome shows/hides */
        height: 100dvh;
        min-height: 100dvh;
    }
}

/* Fallback for browsers without dvh support */
@supports not (height: 100dvh) {
    body::before,
    body::after {
        height: 100vh;
        min-height: 100vh;
    }
}

.container { width: 90%; max-width: 1200px; margin: auto; }
a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }

/* ===== HEADER (transparent, fixed) ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: background-color 0.3s ease, padding 0.3s ease;
    /* Prevent mobile browser issues */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.header.scrolled {
    background-color: rgba(30, 5, 5, 0.92);
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-flex {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    margin-right: auto;
    display: flex;
    align-items: center;
}

.logo img {
    height: 110px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: height 0.3s ease;
}

.header.scrolled .logo img {
    height: 70px;
}

/* ===== DESKTOP NAV ===== */
.desktop-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.desktop-nav a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.desktop-nav a:hover {
    color: #fff;
}

.btn-quote {
    background-color: #B91C1C;
    color: #fff !important;
    padding: 10px 25px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.btn-quote:hover {
    background-color: #991B1B;
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.4);
    transform: translateY(-2px);
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 15px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.lang-switcher a {
    color: rgba(255, 255, 255, 0.6);
    padding: 4px 8px;
    transition: color 0.3s;
}

.lang-switcher a:hover {
    color: #fff;
}

.lang-switcher a.active {
    color: #fff;
    border-bottom: 2px solid #B91C1C;
}

.lang-switcher .lang-divider {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
    user-select: none;
}

/* ===== MOBILE MENU ===== */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: #fff;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: rgba(30, 5, 5, 0.95);
    padding: 20px;
    position: fixed;
    top: var(--header-height, 90px);
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    /* Mobile browser fixes */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
    padding: 15px 0;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.mobile-nav a:hover {
    color: #B91C1C;
}

.mobile-nav .lang-switcher {
    justify-content: center;
    padding: 15px 0;
    margin-left: 0;
    gap: 8px; /* Add more space between language options */
}

.mobile-nav .lang-switcher a {
    padding: 8px 16px; /* Larger tap targets for easier selection */
    border-radius: 4px;
    transition: background-color 0.3s;
}

.mobile-nav .lang-switcher a:hover,
.mobile-nav .lang-switcher a.active {
    background-color: rgba(185, 28, 28, 0.2);
}

.mobile-nav .lang-switcher .lang-divider {
    margin: 0 4px; /* Add spacing around divider */
}

/* ===== MAIN CONTENT SPACING ===== */
main {
    padding-top: 140px;
    position: relative;
    z-index: 1;
}

/* ===== HERO SECTION (homepage only) ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-top: -140px;
    padding-top: 140px;
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 800px;
    padding: 50px 40px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 12px;
}

.hero-content h1 {
    font-size: clamp(22px, 5vw, 42px);
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
    /* Allow text to wrap on smaller screens or longer text */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.subtitle {
    font-size: clamp(16px, 3.5vw, 28px);
    font-weight: 300;
    margin-bottom: 40px;
}

.btn-hero {
    display: inline-block;
    background-color: #B91C1C;
    color: #fff;
    padding: 15px 35px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.btn-hero:hover {
    background-color: #991B1B;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.hero-credit {
    position: absolute;
    bottom: 10px;
    right: 15px;
    z-index: 2;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.hero-credit a {
    color: rgba(255, 255, 255, 0.6);
}

.hero-credit a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ===== CONTENT PANEL ===== */
.content-panel {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 12px;
    padding: 60px 50px;
    margin-bottom: 40px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* ===== FEATURES SECTION ===== */
.features {
    padding: 80px 0;
    text-align: center;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 50px;
    color: #7F1D1D;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-item {
    padding: 20px;
}

.feature-item .icon {
    margin-bottom: 20px;
    color: #B91C1C;
}

.feature-item h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #7F1D1D;
}

.feature-item p {
    color: #555;
    font-size: 16px;
}

/* ===== SERVICES LIST SECTION ===== */
.services-list {
    padding: 0 0 80px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.service-col h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #B91C1C;
    font-weight: 700;
}

.service-col ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    color: #555;
}

.service-col ul li::before {
    content: "\203A";
    position: absolute;
    left: 0;
    color: #B91C1C;
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
    top: 2px;
}

/* ===== PAGE HEADER (subpages) ===== */
.page-header {
    background: transparent;
    padding: 40px 0 30px;
    text-align: center;
    margin-bottom: 0;
}

.page-header h1 {
    font-size: 42px;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
}

.page-header a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.page-header a:hover {
    color: #fff;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: 15px 0 30px;
    font-size: 14px;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 8px;
}

.breadcrumb .current {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ===== SERVICES PAGE GRID ===== */
.services-content {
    padding-bottom: 80px;
}

.services-grid-page {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.service-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(185, 28, 28, 0.15);
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-size: 20px;
    color: #7F1D1D;
    margin-bottom: 15px;
}

.card-content p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    padding: 40px 0 80px;
    max-width: 900px;
}

.about-section h2 {
    font-size: 28px;
    color: #7F1D1D;
    margin-bottom: 15px;
    font-weight: 700;
}

.about-section h3 {
    font-size: 22px;
    color: #B91C1C;
    margin-top: 30px;
    margin-bottom: 10px;
    font-weight: 600;
}

.about-section p {
    color: #444;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-section ul {
    margin: 15px 0 20px 0;
}

.about-section ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: #444;
    font-size: 16px;
    line-height: 1.6;
}

.about-section ul li::before {
    content: "\2022";
    position: absolute;
    left: 5px;
    color: #B91C1C;
    font-weight: bold;
    font-size: 18px;
}

.about-highlight {
    background: #FDF2F2;
    border-left: 4px solid #B91C1C;
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
}

.about-highlight p {
    color: #7F1D1D;
    font-weight: 500;
    margin-bottom: 0;
}

/* ===== CONTACT FORM ===== */
.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #B91C1C;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.contact-form .form-group {
    margin-bottom: 15px;
}

.form-submit-wrapper {
    width: 100%;
    display: block;
    margin-top: 20px;
}

.btn-contact-submit {
    display: block;
    width: 100%;
    background-color: #B91C1C;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 15px 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s, transform 0.2s;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
    line-height: 1.5;
    box-sizing: border-box;
    min-height: 50px;
}

.btn-contact-submit:hover {
    background-color: #991B1B;
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.4);
    transform: translateY(-2px);
}

/* ===== SOCIAL ICONS ===== */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: background-color 0.3s, transform 0.2s;
}

.social-icons a:hover {
    background: #B91C1C;
    transform: translateY(-2px);
}

.social-icons svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Contact page social icons (on white bg) */
.social-section {
    text-align: center;
    padding-bottom: 10px;
}

.social-section .social-icons {
    justify-content: center;
}

.social-section .social-icons a {
    background: #FDF2F2;
    color: #B91C1C;
}

.social-section .social-icons a:hover {
    background: #B91C1C;
    color: #fff;
}

/* ===== FOOTER ===== */
footer {
    background: rgba(30, 5, 5, 0.95);
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

footer a:hover {
    color: #fff;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding: 60px 0 40px;
}

.footer-brand .footer-logo {
    height: 70px;
    width: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links ul li a:hover {
    color: #fff;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.footer-contact svg {
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero-content {
        padding: 40px 30px;
        width: 92%; /* Slightly narrower to prevent edge overflow */
    }
    .hero-content h1 {
        /* Reduce font size on tablets to prevent overflow */
        font-size: clamp(20px, 4.5vw, 36px);
    }
    .feature-grid, .services-grid, .services-grid-page { grid-template-columns: 1fr; gap: 30px; }
    .desktop-nav { display: none; }
    .mobile-toggle { display: flex; }
    .footer-main { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .social-icons { justify-content: center; }
    .footer-contact p { justify-content: center; }
}

@media (max-width: 600px) {
    .hero-content {
        padding: 30px 20px;
        width: 94%; /* Ensure it fits on small screens */
    }
    .hero-content h1 {
        /* Further reduce font size on mobile */
        font-size: clamp(18px, 4vw, 28px);
        line-height: 1.3;
    }
    .footer-bottom { flex-direction: column; text-align: center; gap: 10px; }
    .logo img { height: 80px; }
    .header.scrolled .logo img { height: 55px; }
    main { padding-top: 110px; }
    .hero { margin-top: -110px; padding-top: 110px; }
    .content-panel { padding: 30px 20px; border-radius: 8px; }
    .page-header h1 { font-size: 32px; }
}

@media (max-width: 380px) {
    .hero { min-height: 400px; }
    .hero-content {
        padding: 25px 15px;
        width: 95%;
    }
    .hero-content h1 {
        margin-bottom: 5px;
        /* Very small screens: ensure text wraps */
        font-size: clamp(16px, 3.8vw, 24px);
    }
    .subtitle { margin-bottom: 25px; }
    .btn-hero { padding: 12px 25px; font-size: 14px; }
    .logo img { height: 65px; }
}

/* ===== UTILITY CLASSES ===== */
.content-panel-narrow {
    max-width: 600px;
    margin: 0 auto 40px;
}

.content-panel-narrow-lg {
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-title-small {
    font-size: 24px;
    margin-bottom: 15px;
}

.section-title-small-lg {
    font-size: 24px;
    margin-bottom: 25px;
}

.page-header-subtitle {
    margin-top: 15px;
    font-size: 16px;
}

.text-muted {
    color: #555;
    margin-bottom: 20px;
}

.textarea-large {
    min-height: 120px;
}

.form-status {
    margin-top: 15px;
    text-align: center;
    display: none;
    padding: 15px;
    border-radius: 4px;
    line-height: 1.6;
    border: 1px solid transparent;
    animation: fadeIn 0.3s ease;
}

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

.form-status strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

/* ===== MOBILE & TOUCH DEVICE FIXES ===== */
@media (max-width: 900px) {
    /* Ensure header stays fixed on mobile */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        /* iOS Safari specific fixes */
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    /* Prevent background from scaling incorrectly */
    body::before,
    body::after {
        background-attachment: scroll; /* Better performance on mobile */
    }
}

/* ===== CTA BANNER ===== */
.cta-banner {
    padding: 0 0 80px;
}

.cta-banner .content-panel {
    background: linear-gradient(135deg, #7F1D1D 0%, #991B1B 100%);
    text-align: center;
    color: #fff;
}

.cta-banner .section-title {
    color: #fff;
    margin-bottom: 15px;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.cta-banner .btn-hero {
    background: #fff;
    color: #7F1D1D;
    font-weight: 700;
}

.cta-banner .btn-hero:hover {
    background: #f5f5f5;
    color: #7F1D1D;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ===== FAQ SECTION ===== */
.faq-section {
    padding: 0 0 60px;
    max-width: 900px;
}

.faq-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.faq-item p {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

/* ===== UTILITY ADDITIONS ===== */
.services-cta {
    text-align: center;
    margin-top: 40px;
}

.btn-hero-sm {
    display: inline-block;
    background-color: #B91C1C;
    color: #fff;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.btn-hero-sm:hover {
    background-color: #991B1B;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.section-title-compact {
    margin-bottom: 30px;
}
