/* ===================================================
   BRANDIFY SA — Styles.css (Optimized & Bug-Fixed)
   =================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: Arial, sans-serif;
    background: #f0f0f0;
    color: #000;
    min-height: 100vh;
}

/* ===== SKIP LINK (accessibility + SEO) ===== */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
}

.skip-link:focus {
    left: 6px;
    top: 6px;
    width: auto;
    height: auto;
    overflow: visible;
    padding: 8px 16px;
    background: #c41e3a;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

/* ===== LOGO BUTTON (replaces broken <a href="index .html">) ===== */
.logo-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    transition: opacity 0.2s;
}

.logo-btn:hover {
    opacity: 0.85;
}

.logo-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== SIDEBAR NAVIGATION ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    background: #000;
    padding: 20px 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: #000;
    color: #fff;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: background 0.2s, border-left-color 0.2s;
    border-left: 3px solid transparent;
    line-height: 1.4;
}

.nav-btn:hover,
.nav-btn.active {
    background: #1a1a1a;
    border-left-color: #fff;
}

.nav-btn.home-btn {
    border-bottom: 2px solid #333;
    margin-bottom: 10px;
}

.services-section {
    border-bottom: 2px solid #333;
    margin-bottom: 10px;
}

.services-toggle {
    font-weight: bold;
}

.services-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.services-dropdown.open {
    max-height: 600px;
}

.nav-btn.sub {
    padding-left: 30px;
    font-size: 13px;
}

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    left: auto;
    z-index: 200;
    background: #000;
    border: none;
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    border-radius: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    display: block;
    border-radius: 2px;
    transition: background 0.2s;
}

.mobile-menu-toggle:hover span {
    background: #c41e3a;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 200px;
    padding-bottom: 40px; /* clear fixed legal footer */
}

.page {
    display: none;
    min-height: 100vh;
    background: #fff;
    flex-direction: column;
}

.page.active {
    display: flex;
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: #000;
    color: #fff;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-text {
    flex: 1;
    text-align: center;
}

.brand-text h1 {
    font-size: 48px;
    font-weight: bold;
    margin: 0;
    line-height: 1.1;
}

.brand-text p {
    font-size: 24px;
    font-weight: normal;
    margin: 5px 0 0 0;
}

.page-title {
    font-size: 24px;
    font-weight: normal;
    margin: 0;
    flex: 1;
    text-align: center;
}

h2.page-title {
    font-size: 28px;
    font-weight: bold;
}

/* ===== PAGE CONTENT ===== */
.page-content {
    flex: 1;
    padding: 60px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-content {
    flex-direction: column;
}

.split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-content {
    display: flex;
    align-items: center;
}

.text-content p,
.about-text {
    font-size: 22px;
    line-height: 1.6;
    color: #000;
}

.media-content,
.video-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* ===== YOUTUBE EMBED ===== */
.youtube-embed {
    width: 400px;
    height: 225px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    max-width: 100%;
    position: relative;
}

/* Home page video is larger */
.youtube-embed.home-video {
    width: min(700px, 100%);
    height: 394px;
}

.youtube-embed iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

/* Desktop: iframes have pointer-events disabled by default so mouse wheel
   events pass through to the parent page for scroll navigation.
   Clicking the video container (.video-active) re-enables interaction. */
@media (min-width: 769px) {
    .youtube-embed iframe {
        pointer-events: none;
    }
    .youtube-embed.video-active iframe {
        pointer-events: auto;
    }
}

/* ===== DUAL VIDEO LAYOUT ===== */
.dual-video {
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.dual-video .youtube-embed {
    width: min(560px, 100%);
    height: 315px;
}

/* ===== ABOUT CONTENT ===== */
.about-content {
    flex-direction: column;
    gap: 40px;
    max-width: 900px;
    text-align: center;
}

/* ===== PAGE FOOTER ===== */
.page-footer {
    background: #000;
    color: #fff;
    padding: 20px 40px 30px; /* extra bottom to avoid legal footer overlap */
}

.social-media {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

.social-icon:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

.social-icon.fb { background: #1877F2; }
.social-icon.ig { background: linear-gradient(45deg, #FFD521, #F50000, #B900B4); }
.social-icon.tt { background: #000; border: 2px solid #fff; }
.social-icon.li { background: #0A66C2; }
.social-icon.yt { background: #FF0000; }

.contact-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-info a,
.contact-info span {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.contact-info a:hover {
    text-decoration: underline;
}

.callback-link {
    background: #0A66C2;
    padding: 8px 15px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: background 0.2s;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.callback-link:hover {
    background: #0858a8 !important;
    text-decoration: none !important;
}

/* ===== CALLBACK FORM ===== */
.callback-page .page-content {
    align-items: flex-start;
    padding-top: 40px;
}

.form-content {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.form-field {
    margin-bottom: 25px;
}

.form-field label {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    transition: border-color 0.2s;
    background: #fff;
}

.form-field input:focus {
    outline: none;
    border-color: #c41e3a;
}

.order-box {
    background: #c41e3a;
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
}

.order-box h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.order-box ul {
    list-style: none;
    margin-bottom: 25px;
}

.order-box li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    font-size: 16px;
}

.order-box li:last-child {
    border-bottom: none;
}

.order-box li span {
    font-weight: bold;
    color: #FFD700;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: #000;
    color: #fff;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
    font-family: Arial, sans-serif;
}

.checkout-btn:hover {
    background: #222;
}

.checkout-btn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.8;
}

/* ===== MODAL (shared base) ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

/* ===== SUCCESS MODAL ===== */
.modal-box {
    background: #fff;
    padding: 50px;
    border-radius: 8px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-box h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.modal-box p {
    font-size: 20px;
    margin-bottom: 30px;
    color: #444;
}

.home-btn-modal {
    padding: 12px 30px;
    background: #000;
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    font-family: Arial, sans-serif;
}

.home-btn-modal:hover {
    background: #333;
}

/* ===== TERMS CHECKBOX IN FORM ===== */
.terms-field {
    margin-bottom: 20px;
}

.terms-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.5;
}

.terms-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: #c41e3a;
    cursor: pointer;
}

.terms-link {
    background: none;
    border: none;
    color: #c41e3a;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    font-family: Arial, sans-serif;
    padding: 0;
    display: inline;
}

.terms-link:hover {
    color: #a01530;
}

/* ===== TERMS MODAL ===== */
.terms-modal-overlay {
    z-index: 600;
}

.terms-modal-box {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.4);
}

.terms-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #000;
    color: #fff;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.terms-modal-header h2 {
    font-size: 20px;
    margin: 0;
}

.terms-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
    font-family: Arial, sans-serif;
}

.terms-close-btn:hover {
    color: #c41e3a;
}

.terms-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.7;
    font-size: 14px;
    color: #333;
}

.terms-modal-body h3 {
    font-size: 16px;
    margin: 20px 0 8px 0;
    color: #000;
}

.terms-modal-body h3:first-child {
    margin-top: 0;
}

.terms-modal-body p {
    margin-bottom: 10px;
}

.terms-modal-body a {
    color: #c41e3a;
}

.terms-updated {
    margin-top: 20px;
    font-style: italic;
    color: #888;
    font-size: 13px;
}

.terms-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
    flex-shrink: 0;
}

.terms-accept-btn {
    padding: 12px 28px;
    background: #c41e3a;
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    font-family: Arial, sans-serif;
}

.terms-accept-btn:hover {
    background: #a01530;
}

/* ===== GLOBAL LEGAL FOOTER ===== */
.legal-footer {
    position: fixed;
    bottom: 0;           /* FIX: was -5px which could cause overlap */
    left: 200px;
    right: 0;
    background: #111;
    color: #aaa;
    font-size: 12px;
    z-index: 99;
    border-top: 1px solid #333;
}

.legal-footer-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    flex-wrap: wrap;
}

.legal-divider {
    color: #555;
    flex-shrink: 0;
}

.legal-link {
    background: none;
    border: none;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-family: Arial, sans-serif;
    transition: color 0.2s;
}

.legal-link:hover {
    color: #fff;
}

/* ===== SCROLLBAR ===== */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: #000; }
.sidebar::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

/* ===================================================================
   RESPONSIVE — TABLET (≤ 900px)
   =================================================================== */
@media (max-width: 900px) {
    .split-content {
        gap: 30px;
    }

    .page-content {
        padding: 40px 40px;
    }

    .brand-text h1 {
        font-size: 36px;
    }

    .brand-text p {
        font-size: 18px;
    }

    h2.page-title {
        font-size: 22px;
    }
}

/* ===================================================================
   RESPONSIVE — MOBILE (≤ 768px)
   =================================================================== */
@media (max-width: 768px) {
    /* Sidebar slides off-screen; opened by toggle */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 150;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Show hamburger */
    .mobile-menu-toggle {
        display: flex;
        z-index: 200;
    }

    /* Main shifts to full width */
    .main-content {
        margin-left: 0;
    }

    /* Legal footer spans full width */
    .legal-footer {
        left: 0;
    }

    .legal-footer-inner {
        justify-content: center;
        gap: 6px;
        font-size: 11px;
        padding: 6px 10px;
    }

    .legal-link {
        font-size: 11px;
    }

    /* Page header — no extra padding needed since hamburger is on the right */
    .page-header {
        padding: 15px 70px 15px 15px; /* right padding clears hamburger button */
        gap: 8px;
    }

    /* Shrink logos on mobile */
    .brand-logo {
        width: 50px;
        height: 50px;
    }

    .brand-logo img,
    .logo-btn img {
        width: 50px;
        height: 50px;
    }

    .brand-text h1 {
        font-size: 24px;
    }

    .brand-text p {
        font-size: 14px;
    }

    h2.page-title {
        font-size: 18px;
    }

    /* Single column layout */
    .page-content {
        padding: 25px 15px;
    }

    .split-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .text-content p,
    .about-text {
        font-size: 16px;
    }

    /* Responsive videos */
    .youtube-embed {
        width: 100%;
        height: 0;
        padding-bottom: 56.25%; /* 16:9 ratio */
        position: relative;
        border-radius: 6px;
    }

    .youtube-embed.home-video {
        width: 100%;
        height: 0;
        padding-bottom: 56.25%;
    }

    .youtube-embed iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .dual-video .youtube-embed {
        width: 100%;
        height: 0;
        padding-bottom: 56.25%;
        position: relative;
    }

    /* Ensure video wrappers fill their containers */
    .video-wrapper,
    .media-content {
        width: 100%;
    }

    /* Page footer */
    .page-footer {
        padding: 20px 15px 35px;
    }

    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }

    .contact-info a,
    .contact-info span {
        white-space: normal;
    }

    .callback-link {
        margin: 0;
        justify-content: center;
    }

    /* Form */
    .callback-page .page-content {
        padding: 20px 15px;
    }

    .form-field label {
        font-size: 16px;
    }

    .form-field input {
        font-size: 15px;
        padding: 10px;
    }

    .order-box {
        padding: 20px;
    }

    .order-box h3 {
        font-size: 17px;
    }

    .order-box li {
        font-size: 14px;
    }

    .checkout-btn {
        font-size: 16px;
        padding: 13px;
    }

    /* Modal */
    .modal-box {
        padding: 30px 20px;
    }

    .modal-box h2 {
        font-size: 24px;
    }

    .modal-box p {
        font-size: 16px;
    }

    .terms-modal-header h2 {
        font-size: 16px;
    }
}

/* ===================================================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   =================================================================== */
@media (max-width: 480px) {
    .page-header {
        padding: 12px 55px 12px 10px;
        gap: 6px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    .brand-logo img,
    .logo-btn img {
        width: 42px;
        height: 42px;
    }

    .brand-text h1 {
        font-size: 18px;
    }

    .brand-text p {
        font-size: 12px;
    }

    h2.page-title {
        font-size: 15px;
    }

    .social-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .legal-footer-inner {
        justify-content: center;
        text-align: center;
    }
}