/* ============================================
   BULUT VINÇ - UI/UX FIXES
   BV1-BV6 Targeted Fixes Only
   ============================================ */

/* === BV1: MOBILE TEXT OVERFLOW FIX === */
@media (max-width: 767px) {

    body,
    p,
    h1,
    h2,
    h3,
    h4,
    li,
    a,
    span,
    .hero-tagline,
    .hero-power-sentence,
    .hero-company-name,
    .mini-cta-bar {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    body {
        line-height: 1.5;
    }

    p {
        line-height: 1.6;
    }

    h1,
    h2,
    h3 {
        line-height: 1.3;
    }

    /* Prevent any element from exceeding container */
    * {
        max-width: 100%;
    }

    .container {
        overflow-x: hidden;
    }
}

/* === BV2: WHATSAPP BUTTON COLOR CONSISTENCY === */
/* Define WhatsApp green color */
:root {
    --color-whatsapp: #25D366;
    --color-whatsapp-hover: #1EBE5A;
}

/* ALL WhatsApp buttons must use the same green */
.btn-whatsapp,
[data-whatsapp].btn,
a[data-whatsapp] {
    background-color: var(--color-whatsapp) !important;
    color: var(--color-white) !important;
    border: none !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.btn-whatsapp:hover,
[data-whatsapp].btn:hover,
a[data-whatsapp]:hover {
    background-color: var(--color-whatsapp-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* === BV3: HEADER LOGO & NAV UNDERLINE CLEANUP === */
/* Remove underline from logo */
.logo,
.logo:hover,
.logo:focus,
.logo:visited {
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
}

/* Remove underline from ALL navigation items */
.nav-menu li a,
.nav-menu li a:hover,
.nav-menu li a:focus,
.nav-menu li a.active {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Active state: only color change, no underline */
.nav-menu li a.active {
    color: var(--color-industrial-yellow);
    background-color: rgba(245, 196, 0, 0.1);
    border-radius: var(--radius-sm);
}

.nav-menu li a:hover {
    color: var(--color-industrial-yellow);
}

/* === BV4: WHITE GAP / PAGE CUT FIX === */
/* Ensure seamless section flow */
.hero {
    margin-bottom: 0 !important;
    padding-bottom: 0;
}

.section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove gaps between hero and next section */
.hero+.section,
.hero+.trust-badges,
.hero+section {
    margin-top: 0 !important;
    padding-top: var(--space-12);
}

/* Seamless background flow */
.bg-dark {
    background: var(--gradient-dark);
}

/* Ensure no white gaps */
.trust-badges,
.services-grid-section {
    background: inherit;
}

/* === BV5: PHONE + WHATSAPP COMBINED CARD FIX === */
/* Premium card for combined phone + WhatsApp CTAs */
.mini-cta-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
    background: linear-gradient(135deg, var(--color-black) 0%, var(--color-dark-gray) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(245, 196, 0, 0.2);
    box-shadow: var(--shadow-lg);
}

/* Phone button in yellow */
.mini-cta-bar .cta-phone,
.btn-phone {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--gradient-yellow);
    color: var(--color-black) !important;
    font-weight: 700;
    font-size: var(--text-base);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-yellow);
}

.mini-cta-bar .cta-phone:hover,
.btn-phone:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 196, 0, 0.5);
}

/* WhatsApp button in card - green */
.mini-cta-bar a[data-whatsapp],
.mini-cta-bar .btn-link[data-whatsapp] {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--color-whatsapp) !important;
    color: var(--color-white) !important;
    font-weight: 600;
    font-size: var(--text-base);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-base);
}

.mini-cta-bar a[data-whatsapp]:hover,
.mini-cta-bar .btn-link[data-whatsapp]:hover {
    background: var(--color-whatsapp-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* Hide dividers and badge text for cleaner look */
.mini-cta-bar .divider {
    display: none;
}

.mini-cta-bar .badge-text {
    display: none;
}

/* === BV6: CONTACT PAGE PHONE BUTTON === */
/* Style phone as clear button on contact page */
.contact-phone-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    background: var(--gradient-yellow);
    color: var(--color-black) !important;
    font-weight: 700;
    font-size: var(--text-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-yellow);
}

.contact-phone-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(245, 196, 0, 0.5);
}

/* Trust badge phone styling as button */
.trust-badge .btn-phone-inline {
    display: inline-block;
    padding: var(--space-3) var(--space-5);
    background: var(--gradient-yellow);
    color: var(--color-black) !important;
    font-weight: 700;
    font-size: var(--text-xl);
    border-radius: var(--radius-md);
    text-decoration: none !important;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-yellow);
    margin: var(--space-3) 0;
}

.trust-badge .btn-phone-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 196, 0, 0.5);
}

/* === ADDITIONAL CLEANUP === */
/* Remove any default link underlines */
a {
    text-decoration: none;
}

/* Ensure buttons don't have underlines */
.btn,
.btn:hover,
.btn:focus {
    text-decoration: none !important;
}

/* === SECTION TRANSITION - DARK TO WHITE === */
/* Smooth gradient fade from dark hero to white content */

/* Hero section with gradient fade at bottom */
.hero {
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(248, 248, 248, 0.3) 40%,
            rgba(248, 248, 248, 0.7) 70%,
            #F8F8F8 100%);
    pointer-events: none;
    z-index: 3;
}

/* Alternative: Curved wave separator */
.section-wave-transition {
    position: relative;
}

.section-wave-transition::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--color-white);
    clip-path: ellipse(60% 100% at 50% 100%);
}

/* Service pages: smooth top transition for white sections */
.section {
    position: relative;
    background: var(--color-white);
}

/* Gradient overlay at top of white sections */
.hero+.section::before,
section.hero+section.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom,
            #F8F8F8 0%,
            rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Dark sections (trust badges, etc.) - fade into white below */
.bg-dark {
    position: relative;
}

.bg-dark::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(248, 248, 248, 0.5) 50%,
            #F8F8F8 100%);
    pointer-events: none;
}

/* CTA section transition */
.cta-section {
    position: relative;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(248, 248, 248, 0.4) 40%,
            #F8F8F8 100%);
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 767px) {

    .hero::after,
    .bg-dark::after,
    .cta-section::after {
        height: 50px;
    }

    .hero+.section::before {
        height: 30px;
    }
}

/* ============================================
   SERVICE PAGE HERO HEIGHT FIX
   Non-homepage pages get taller hero
   ============================================ */

/* Service pages hero - identified by having .service-hero class or inline min-height */
body:not(.homepage) .hero {
    min-height: 100vh;
}

@media (max-width: 767px) {

    /* Mobile: Increase hero height by ~25% */
    body:not(.homepage) .hero {
        min-height: 85vh;
        padding-top: 100px;
        padding-bottom: var(--space-12);
    }

    body:not(.homepage) .hero-content {
        padding-top: var(--space-8);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {

    /* Tablet: Balanced height */
    body:not(.homepage) .hero {
        min-height: 90vh;
    }
}

@media (min-width: 1024px) {

    /* Desktop: Full height for visual balance */
    body:not(.homepage) .hero {
        min-height: 95vh;
    }
}

/* ============================================
   BV-FINAL: HOMEPAGE VIDEO VISIBILITY
   ============================================ */
.homepage .hero-background video {
    opacity: 1 !important;
    filter: none;
}

/* ============================================
   BV-FINAL: CONTACT PAGE DARK MODE
   ============================================ */
.contact-page {
    background-color: var(--color-black);
    color: var(--color-white);
}

.contact-page .section:not(.cta-section):not(.hero) {
    background-color: var(--color-black);
}

.contact-page h2,
.contact-page h3 {
    color: var(--color-industrial-yellow);
}

.contact-page .trust-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-white);
}

.contact-page .trust-badge p {
    color: rgba(255, 255, 255, 0.8);
}

/* Fix WhatsApp button overflow in contact cards */
.contact-page .trust-badge .btn-whatsapp {
    max-width: 100%;
    width: auto;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    white-space: normal;
    /* Allow text wrap if needed */
    height: auto;
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
    box-sizing: border-box;
}


/* Contact Form Dark Styles */
.contact-form-container {
    background: #1A1A1A !important;
    border: 1px solid #333 !important;
    color: var(--color-white);
}

.contact-form-container label {
    color: var(--color-white) !important;
}

.contact-form-container input,
.contact-form-container select,
.contact-form-container textarea {
    background: #252525;
    border: 1px solid #444 !important;
    color: var(--color-white) !important;
}

.contact-form-container input:focus,
.contact-form-container select:focus,
.contact-form-container textarea:focus {
    border-color: var(--color-industrial-yellow) !important;
    outline: none;
}

/* Company Info Box - Brand Yellow */
.company-info-box {
    background: var(--color-industrial-yellow) !important;
    color: var(--color-black) !important;
}

.company-info-box h2,
.company-info-box h3,
.company-info-box a,
.company-info-box span,
.company-info-box p,
.company-info-box li {
    color: var(--color-black) !important;
}

.company-info-box a:hover {
    text-decoration: underline;
}

/* ============================================
   BV-FINAL: GLOBAL SERVICE CARDS DARK MODE
   ============================================ */

/* Target all trust badges and service cards on service pages */
body:not(.homepage) .trust-badge,
body:not(.homepage) .service-card {
    background: var(--color-black) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--color-white) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

body:not(.homepage) .trust-badge h3,
body:not(.homepage) .service-card h3 {
    color: var(--color-industrial-yellow) !important;
}

body:not(.homepage) .trust-badge p,
body:not(.homepage) .service-card p {
    color: rgba(255, 255, 255, 0.7) !important;
}

body:not(.homepage) .trust-badge-icon,
body:not(.homepage) .service-card-icon {
    filter: brightness(1.2);
}

/* Use cases / Checklist containers */
body:not(.homepage) section.section div[style*="background: var(--color-gray-50)"],
body:not(.homepage) section.section div[style*="background: var(--color-gray-100)"],
body:not(.homepage) section.section div[style*="background: var(--color-gray-200)"] {
    background: #111 !important;
    border: 1px solid #222 !important;
    color: #ffffff !important;
}

/* Force visibility for all nested text elements in these containers */
body:not(.homepage) section.section div[style*="background: var(--color-gray-50)"] li,
body:not(.homepage) section.section div[style*="background: var(--color-gray-100)"] li,
body:not(.homepage) section.section div[style*="background: var(--color-gray-200)"] li,
body:not(.homepage) section.section div[style*="background: var(--color-gray-50)"] span:not([style*="color: var(--color-industrial-yellow)"]),
body:not(.homepage) section.section div[style*="background: var(--color-gray-100)"] span:not([style*="color: var(--color-industrial-yellow)"]),
body:not(.homepage) section.section div[style*="background: var(--color-gray-200)"] span:not([style*="color: var(--color-industrial-yellow)"]),
body:not(.homepage) section.section div[style*="background: var(--color-gray-50)"] strong,
body:not(.homepage) section.section div[style*="background: var(--color-gray-100)"] strong,
body:not(.homepage) section.section div[style*="background: var(--color-gray-200)"] strong,
body:not(.homepage) section.section div[style*="background: var(--color-gray-50)"] b,
body:not(.homepage) section.section div[style*="background: var(--color-gray-100)"] b,
body:not(.homepage) section.section div[style*="background: var(--color-gray-200)"] b,
body:not(.homepage) section.section div[style*="background: var(--color-gray-50)"] p,
body:not(.homepage) section.section div[style*="background: var(--color-gray-100)"] p,
body:not(.homepage) section.section div[style*="background: var(--color-gray-200)"] p {
    color: #ffffff !important;
}

body:not(.homepage) section.section ul li {
    border-bottom: 1px solid #222 !important;
}

/* ============================================
   BV-FINAL: MOBILE MENU LOGO FIX
   ============================================ */

@media (max-width: 768px) {
    .nav-menu {
        justify-content: flex-start !important;
        padding-top: 100px !important;
    }

    .nav-menu::before {
        margin-bottom: var(--space-4) !important;
        font-size: var(--text-2xl) !important;
        display: block !important;
        width: 100%;
        text-align: center;
    }

    .nav-menu::after {
        top: 135px !important;
    }

    /* Contact Page Mobile Layout Fix */
    .contact-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }

    .contact-form-container,
    .company-info-box {
        width: 100% !important;
    }

    body {
        overflow-x: hidden !important;
    }
}

/* ==================================================
   URGENT HOTFIX: MOBILE HERO TEXT CLIPPING
   Ensures visibility and readable lines on mobile
   ================================================== */
@media (max-width: 768px) {

    /* Ensure hero content is fully visible and not clipped */
    .homepage .hero-content {
        transform: none !important;
        height: auto !important;
        overflow: visible !important;
        padding-top: var(--space-6) !important;
    }

    /* Fix typography rendering and line-height to prevent overlap */
    .hero-title {
        line-height: 1.35 !important;
        overflow: visible !important;
        margin-bottom: var(--space-4) !important;
    }

    .hero-company-name,
    .hero-tagline {
        display: block;
        line-height: 1.25;
    }
}