/* ==========================================================================
   Dheepam Consultant Services — Responsive Stylesheet
   Version: 1.0.0
   Breakpoints:
     Large Desktop : min-width 1440px
     Desktop       : min-width 1024px  (base styles in style.css)
     Tablet        : max-width 1023px
     Mobile        : max-width 767px
     Small Mobile  : max-width 375px
   ========================================================================== */

/* Enforce zero side scroll & prevent white space on mobile devices */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
}

.container, .hero-section, .section, .topbar, .site-header, .header, .footer, .stats-bar {
    max-width: 100vw;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   1. Large Desktop — min-width: 1440px
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }

    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 2.75rem;
    }

    .hero-title {
        font-size: 4.25rem;
    }

    .section {
        padding: 112px 0;
    }

    .hero {
        padding: 140px 0 100px;
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 28px;
    }

    .blog-grid {
        gap: 32px;
    }

    .footer-grid {
        gap: 64px;
    }
}

/* --------------------------------------------------------------------------
   2. Tablet — max-width: 1023px
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    /* Typography */
    h1 { font-size: 2.75rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .section-title { font-size: 2rem; }
    .section { padding: 72px 0; }
    .section-header { margin-bottom: 48px; }

    /* --- Header --- */
    /* Hide desktop nav, show hamburger */
    .nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Optionally collapse header CTA text label on tablet */
    .header-cta .btn-text {
        display: none;
    }

    /* Make CTA buttons icon-only / smaller on tablet */
    .header-cta .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    /* --- Hero --- */
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        flex: none;
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-trust {
        justify-content: center;
    }

    .hero-visual {
        display: none; /* Hide on tablet — can show a condensed version if needed */
    }

    .hero-badge {
        /* Centered on tablet */
    }

    /* --- Stats --- */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item:nth-child(2) {
        border-right: none;
    }

    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        border-bottom: 1px solid var(--border);
    }

    .stat-item:nth-child(3) {
        border-right: 1px solid var(--border);
    }

    /* --- Services --- */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Process --- */
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 48px;
    }

    /* Hide the single horizontal connector line on tablet since grid wraps */
    .process-grid::before {
        display: none;
    }

    /* --- Features --- */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Industries --- */
    .industries-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* --- Blog --- */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-search {
        width: 180px;
    }

    .blog-search:focus {
        width: 220px;
    }

    /* --- Pricing --- */
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-card.featured {
        transform: none;
        grid-column: span 2;
        max-width: 420px;
        margin: 0 auto;
        width: 100%;
    }

    /* --- Contact --- */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 36px;
    }

    /* --- Footer --- */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    /* --- Team --- */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- About stats --- */
    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* --- Values --- */
    .values-grid {
        grid-template-columns: 1fr;
    }

    /* --- Page hero --- */
    .page-hero {
        padding: 130px 0 60px;
    }

    .page-hero h1 {
        font-size: 2.25rem;
    }

    /* --- Testimonials --- */
    .testimonial-card {
        padding: 36px;
    }

    /* --- CTA Section --- */
    .cta-title {
        font-size: 2.25rem;
    }

    /* --- FAQ --- */
    .faq-categories {
        gap: 8px;
    }

    /* --- Careers --- */
    .job-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .job-apply-btn {
        width: 100%;
    }

    .job-apply-btn .btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Benefits grid --- */
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    /* --- Grid utilities --- */
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --------------------------------------------------------------------------
   3. Mobile — max-width: 767px
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    /* Typography */
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }
    h4 { font-size: 1.125rem; }

    .section-title    { font-size: 1.75rem; }
    .section-subtitle { font-size: 1rem; }

    /* Layout */
    .container { padding: 0 20px; }
    .section   { padding: 56px 0; }
    .section-header { margin-bottom: 40px; }

    /* Grid utilities reset */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    /* --- Header --- */
    .header { padding: 16px 0; }
    .header.scrolled { padding: 10px 0; }

    .header-cta {
        gap: 8px;
    }

    /* Keep only the primary CTA, hide secondary */
    .header-cta .btn-secondary {
        display: none;
    }

    /* --- Hero --- */
    .hero {
        padding: 100px 0 60px;
        min-height: unset;
    }

    .hero-title {
        font-size: 2.125rem;
        letter-spacing: -0.025em;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .hero-trust {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .hero-trust-avatars {
        justify-content: center;
    }

    .hero-scroll-indicator {
        bottom: 20px;
    }

    /* --- Stats --- */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .stat-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    /* Remove right border for all, add bottom */
    .stat-item:nth-child(odd) {
        border-right: 1px solid var(--border);
    }

    .stat-item:nth-child(3),
    .stat-item:nth-child(4) {
        border-bottom: none;
    }

    .stat-number {
        font-size: 2.25rem;
    }

    /* --- Services --- */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card {
        padding: 28px 24px;
    }

    /* --- Process --- */
    .process-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .process-grid::before {
        display: none;
    }

    .process-connector {
        display: none;
    }

    .step-number {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    /* --- Features --- */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* --- Industries --- */
    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* --- Testimonials --- */
    .testimonial-card {
        padding: 28px 20px;
    }

    .testimonial-quote {
        font-size: 3.5rem;
    }

    .testimonial-text {
        font-size: 0.9375rem;
    }

    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .slider-controls {
        margin-top: 24px;
    }

    /* --- CTA Section --- */
    .cta-section {
        padding: 64px 0;
    }

    .cta-title {
        font-size: 1.875rem;
    }

    .cta-subtitle {
        font-size: 1rem;
    }

    .cta-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .cta-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* --- FAQ --- */
    .faq-search {
        height: 48px;
        font-size: 0.9rem;
    }

    .faq-categories {
        gap: 8px;
    }

    .faq-question {
        font-size: 0.9375rem;
        padding: 20px 0;
    }

    /* --- Blog --- */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar */
        scrollbar-width: none;
    }

    .blog-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .blog-search-wrapper {
        margin-left: 0;
        width: 100%;
        margin-top: 12px;
    }

    .blog-search {
        width: 100%;
    }

    .blog-search:focus {
        width: 100%;
    }

    .blog-filters {
        flex-wrap: wrap;
    }

    /* --- Pricing --- */
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pricing-card.featured {
        transform: none;
        grid-column: auto;
        max-width: 100%;
    }

    .pricing-card {
        padding: 32px 24px;
    }

    /* --- Contact --- */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .enquiry-section-grid {
        grid-template-columns: 1fr !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        gap: 28px !important;
    }

    .enquiry-form-card,
    .contact-info-card-box,
    .whatsapp-cta-box,
    .enquiry-contact-col {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    .contact-form {
        padding: 28px 24px;
    }

    .contact-info-card {
        padding: 28px 24px;
    }

    /* --- Forms --- */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group {
        margin-bottom: 16px;
    }

    /* --- Modal --- */
    .modal-box {
        padding: 32px 24px;
        border-radius: var(--radius);
    }

    /* --- Floating Buttons --- */
    .floating-buttons {
        bottom: 20px;
        right: 16px;
        gap: 10px;
    }

    .whatsapp-float {
        width: 52px;
        height: 52px;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }

    .phone-float {
        width: 44px;
        height: 44px;
    }

    /* --- Page Hero --- */
    .page-hero {
        padding: 110px 0 52px;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    /* --- Footer --- */
    .footer {
        padding-top: 56px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding-bottom: 48px;
    }

    .footer-tagline {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .footer-legal {
        justify-content: center;
        gap: 16px;
    }

    /* --- Team --- */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .team-card {
        padding: 24px 16px;
    }

    .team-avatar {
        width: 64px;
        height: 64px;
        font-size: 1.25rem;
    }

    /* --- Values --- */
    .values-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* --- About stats --- */
    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .about-stat-number {
        font-size: 2.25rem;
    }

    /* --- Careers --- */
    .job-card {
        padding: 24px 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .job-apply-btn .btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Service detail --- */
    .service-step {
        flex-direction: column;
        padding: 24px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* --- Buttons --- */
    .btn-lg {
        padding: 15px 28px;
        font-size: 1rem;
    }

    /* Stat section text */
    .stat-label {
        font-size: 0.75rem;
    }
}

/* --------------------------------------------------------------------------
   4. Small Mobile — max-width: 375px
   -------------------------------------------------------------------------- */
@media (max-width: 375px) {
    h1          { font-size: 1.875rem; }
    h2          { font-size: 1.5rem; }
    .hero-title { font-size: 1.875rem; }

    .container  { padding: 0 16px; }
    .section    { padding: 48px 0; }

    .stat-number { font-size: 2rem; }

    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .industry-card {
        padding: 20px 12px;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .about-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 0.9375rem;
    }

    .testimonial-card {
        padding: 24px 16px;
    }

    .pricing-card {
        padding: 28px 20px;
    }

    .modal-box {
        padding: 24px 16px;
    }

    .footer-grid {
        gap: 32px;
    }

    .logo-text .logo-name {
        font-size: 0.9375rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

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

    .hero-actions .btn {
        width: 100%;
    }

    .cta-title {
        font-size: 1.625rem;
    }

    .faq-question {
        font-size: 0.875rem;
    }
}

/* --------------------------------------------------------------------------
   5. Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .header,
    .footer,
    .floating-buttons,
    .back-to-top,
    .hero-scroll-indicator,
    .modal-overlay,
    .hamburger,
    .mobile-menu {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        min-height: unset;
        padding: 40px 0;
        background: #0B0C0E;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .section {
        padding: 32px 0;
        break-inside: avoid;
    }

    .service-card,
    .feature-card,
    .blog-card {
        break-inside: avoid;
    }

    a {
        text-decoration: none;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        color: #6B7280;
    }
}

/* --------------------------------------------------------------------------
   6. Accessibility — Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-title,
    .hero-subtitle,
    .hero-actions,
    .hero-badge,
    .hero-visual {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --------------------------------------------------------------------------
   7. Dark Mode (System Preference) — Subtle Adaptation
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    /* Note: Only apply dark adaptations if not overridden by user preference.
       The main site uses a light theme; these rules provide gentle contrast support. */

    /* Dark mode can be expanded here if required in future */
}

/* --------------------------------------------------------------------------
   8. Touch Device Optimisations
   -------------------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover-only effects that can get stuck on touch */
    .service-card:hover,
    .feature-card:hover,
    .industry-card:hover,
    .blog-card:hover,
    .job-card:hover,
    .team-card:hover,
    .value-card:hover,
    .pricing-card:hover {
        transform: none;
    }

    /* Keep shadow feedback on touch but no lift */
    .service-card:active,
    .feature-card:active {
        box-shadow: var(--shadow);
    }

    /* Larger tap targets */
    .nav-link,
    .footer-link,
    .faq-question {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .slider-btn {
        width: 48px;
        height: 48px;
    }

    .slider-dot {
        width: 10px;
        height: 10px;
    }

    .faq-category-btn,
    .filter-btn {
        padding: 10px 20px;
    }
}


