/* ============================================================
   DHANRAJ & SONS — Custom Styles
   Supplements Tailwind CSS and components.css
   ============================================================ */

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-video-container {
    position: relative;
    width: 100%;
    height: 100vh; /* fallback for browsers without dvh support (Safari < 15.4) */
    height: 100dvh;
    min-height: 560px; /* ensures hero is visible even if viewport height fails */
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(15, 23, 42, 0.92) 0%,
        rgba(15, 23, 42, 0.75) 40%,
        rgba(15, 23, 42, 0.55) 70%,
        rgba(15, 23, 42, 0.40) 100%
    );
}

@media (max-width: 768px) {
    .hero-overlay {
        background: linear-gradient(180deg,
            rgba(15, 23, 42, 0.85) 0%,
            rgba(15, 23, 42, 0.75) 50%,
            rgba(15, 23, 42, 0.90) 100%
        );
    }
}

/* ============================================================
   SCROLL SNAP CAROUSEL (Services on mobile)
   ============================================================ */
.scroll-snap-x {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 1rem;
    padding-bottom: 0.5rem;
}
.scroll-snap-x::-webkit-scrollbar {
    display: none;
}
.scroll-snap-x > * {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* ============================================================
   CLIENT LOGO GRAYSCALE EFFECT
   ============================================================ */
.logo-grayscale {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}
.logo-grayscale:hover {
    filter: grayscale(0%);
    opacity: 1;
}
@media (max-width: 768px) {
    .logo-grayscale {
        filter: grayscale(0%);
        opacity: 0.8;
    }
}

/* ============================================================
   TIMELINE (About page)
   ============================================================ */
.timeline {
    position: relative;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--primary-light), var(--border));
    transform: translateX(-50%);
}
@media (max-width: 768px) {
    .timeline::before {
        left: 1rem;
    }
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--primary);
    position: absolute;
    top: 1.5rem;
    z-index: 1;
}

/* ============================================================
   PROCESS STEPS (Service detail)
   ============================================================ */
.step-connector {
    position: absolute;
    top: 50%;
    left: 100%;
    width: 2rem;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--border));
}
@media (max-width: 768px) {
    .step-connector {
        top: 100%;
        left: 50%;
        width: 2px;
        height: 1.5rem;
        background: linear-gradient(180deg, var(--primary), var(--border));
        transform: translateX(-50%);
    }
}

/* ============================================================
   SCROLL DOWN INDICATOR
   ============================================================ */
@keyframes bounce-down {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.5; }
}
.scroll-indicator {
    animation: bounce-down 2s ease-in-out infinite;
}

/* ============================================================
   MEGA DROPDOWN ARROW
   ============================================================ */
.mega-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: white;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

/* ============================================================
   BLOG POST CONTENT (prose-like styling)
   ============================================================ */
.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}
.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.prose p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}
.prose ul, .prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: var(--text-secondary);
}
.prose a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.prose a:hover {
    color: var(--primary-light);
}
.prose img {
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    max-width: 100%;
    height: auto;
}
.prose blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.prose th, .prose td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    text-align: left;
}
.prose th {
    background: var(--surface);
    font-weight: 600;
    color: var(--text);
}

/* ============================================================
   SAFE AREA PADDING (iPhone notch/home indicator)
   ============================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .safe-area-bottom {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    header, footer, .float-btn, .chatbot-launcher {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
