/* ==========================================================================
   MOBILE SUPER COOL - Sri Thirumalai Enterprises
   Mobile-first premium responsive enhancements
   ========================================================================== */

/* =============================================
   GLOBAL MOBILE BASE
   ============================================= */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

/* =============================================
   MOBILE BOTTOM NAV BAR (NEW - Only on mobile)
   ============================================= */
.mobile-bottom-nav {
    display: none;
}

@media screen and (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 64px;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(26, 60, 52, 0.08);
        z-index: 999;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.08);
        justify-content: space-around;
        align-items: center;
        padding: 0 0.5rem;
    }

    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        flex: 1;
        height: 100%;
        color: #999;
        text-decoration: none;
        font-size: 0.6rem;
        font-family: 'Outfit', sans-serif;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.25s ease;
        padding: 0 0.3rem;
        border-radius: 12px;
        position: relative;
    }

    .mobile-bottom-nav a i {
        font-size: 1.2rem;
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:active {
        color: #1a3c34;
    }

    .mobile-bottom-nav a.active i {
        transform: translateY(-3px) scale(1.1);
        color: #c9a36f;
    }

    .mobile-bottom-nav a::before {
        content: '';
        position: absolute;
        top: 6px;
        width: 28px;
        height: 28px;
        background: transparent;
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    .mobile-bottom-nav a.active::before {
        background: rgba(201, 163, 111, 0.12);
    }

    /* Whatsapp special tab */
    .mobile-bottom-nav .wa-tab {
        color: #25d366;
    }

    .mobile-bottom-nav .wa-tab i {
        font-size: 1.4rem;
    }

    /* Push page content above bottom nav */
    body {
        padding-bottom: 64px;
    }

    /* Hide old WhatsApp float on mobile (bottom nav has it) */
    .whatsapp-float {
        display: none !important;
    }
}

/* =============================================
   HEADER - MOBILE
   ============================================= */
@media screen and (max-width: 768px) {
    .header {
        height: 64px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(26, 60, 52, 0.08);
        box-shadow: none;
    }

    .header.scroll-active {
        height: 58px;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    }

    .header-container {
        padding: 0 1rem;
    }

    .logo-img {
        height: 38px;
        width: 38px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid rgba(201, 163, 111, 0.3);
    }

    .logo-text-wrapper {
        font-size: 0.95rem;
    }

    .logo-text-wrapper span:first-child {
        font-size: 0.72rem;
        color: #888;
    }

    /* Hide hamburger — we use bottom nav */
    .nav-toggle {
        display: flex;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: rgba(26, 60, 52, 0.06);
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        color: #1a3c34;
    }

    /* Slide-in menu stays premium */
    .nav {
        border-radius: 0 0 0 24px;
        padding: 4.5rem 1.8rem 2rem;
    }
}

/* =============================================
   HERO SECTION - MOBILE SUPER COOL
   ============================================= */
@media screen and (max-width: 768px) {
    .hero {
        min-height: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: calc(var(--header-height) + 3.5rem);
        padding-bottom: calc(64px + 2rem);
        /* bottom nav height + breathing room */
        text-align: left;
        position: relative;
        overflow: hidden;
    }

    .hero-bg {
        position: absolute;
        inset: 0;
        background:
            linear-gradient(to top,
                rgba(0, 0, 0, 0.85) 0%,
                rgba(0, 0, 0, 0.4) 50%,
                rgba(0, 0, 0, 0.15) 100%),
            url('../images/hero-bg.jpg') center/cover no-repeat;
        background-color: #1a3c34;
        animation: none;
    }

    /* Floating gradient orbs for depth */
    .hero::before {
        width: 200px;
        height: 200px;
        top: 10%;
        right: -60px;
        opacity: 0.15;
        animation: float 8s infinite ease-in-out;
    }

    .hero::after {
        width: 150px;
        height: 150px;
        bottom: 80px;
        left: -40px;
        opacity: 0.1;
        animation-delay: 3s;
    }

    .hero-content {
        max-width: 100%;
        width: 100%;
        padding: 0 1.2rem;
        position: relative;
        z-index: 2;
    }

    .hero-subtitle {
        font-size: 0.72rem;
        letter-spacing: 3px;
        color: #c9a36f;
        margin-bottom: 0.8rem;
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }

    .hero-subtitle::before {
        content: '';
        display: inline-block;
        width: 30px;
        height: 1px;
        background: #c9a36f;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 2.8rem);
        line-height: 1.1;
        margin-bottom: 1rem;
        color: #fff;
        letter-spacing: -0.5px;
    }

    .hero-description {
        font-size: 0.9rem;
        opacity: 0.85;
        margin-bottom: 2rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.9);
        max-width: 320px;
    }

    .hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.8rem;
        width: 100%;
    }

    .hero-buttons .btn {
        flex: 1;
        min-width: 130px;
        width: auto;
        padding: 0.85rem 1.2rem;
        font-size: 0.75rem;
        letter-spacing: 1px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        border-radius: 50px;
    }

    .hero-buttons .btn-primary {
        background: linear-gradient(135deg, #c9a36f, #b8860b);
        border: none;
        color: #fff;
        box-shadow: 0 8px 25px rgba(201, 163, 111, 0.4);
    }

    .hero-buttons .btn-outline {
        border: 1.5px solid rgba(255, 255, 255, 0.5);
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
    }

    .scroll-down {
        bottom: 76px;
        font-size: 1.3rem;
        opacity: 0.6;
    }

    /* Hero stats strip */
    .hero-stats {
        display: flex;
        gap: 0;
        margin-top: 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        padding-top: 1.2rem;
    }

    .hero-stat {
        flex: 1;
        text-align: center;
    }

    .hero-stat:not(:last-child) {
        border-right: 1px solid rgba(255, 255, 255, 0.12);
    }

    .hero-stat-num {
        display: block;
        font-family: 'Playfair Display', serif;
        font-size: 1.4rem;
        color: #c9a36f;
        font-weight: 700;
        line-height: 1;
    }

    .hero-stat-label {
        display: block;
        font-size: 0.62rem;
        color: rgba(255, 255, 255, 0.6);
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-top: 3px;
    }
}

/* =============================================
   ABOUT SECTION - MOBILE
   ============================================= */
@media screen and (max-width: 768px) {
    .about {
        padding: 3.5rem 0 3rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image-wrapper {
        position: relative !important;
        margin: 0 auto 2.5rem;
        padding: 10px;
        max-width: 100%;
        overflow: visible !important;
    }

    .about-image-wrapper::before {
        display: none;
    }

    .about-img-container {
        height: 280px;
        border-radius: 18px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
        overflow: hidden;
    }

    .experience-badge {
        position: absolute !important;
        bottom: -18px !important;
        right: 10px !important;
        width: 105px !important;
        height: 105px !important;
        z-index: 20 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    }

    .experience-wrap {
        width: 90px !important;
        height: 90px !important;
    }

    .about-data {
        padding: 0 0.2rem;
    }

    .about-data .section-title {
        font-size: 1.7rem;
        text-align: left !important;
    }

    .about-data .section-subtitle {
        text-align: left;
    }

    .about-list li {
        font-size: 0.9rem;
    }

    .about-data .btn {
        width: 100%;
        text-align: center;
        display: block;
        padding: 1rem 2rem;
        border-radius: 50px;
        background: #1a3c34;
        color: #fff;
        font-size: 0.8rem;
        letter-spacing: 2px;
        box-shadow: 0 8px 25px rgba(26, 60, 52, 0.25);
    }
}

/* =============================================
   SERVICES SECTION - MOBILE
   ============================================= */
@media screen and (max-width: 768px) {
    .services {
        padding: 3.5rem 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .service-card {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
        min-height: 0;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .service-card:active {
        transform: scale(0.98);
    }

    .service-image {
        grid-column: 1 / -1;
        height: 180px;
        border-radius: 0;
    }

    .service-card .service-icon {
        grid-column: 1;
        grid-row: 2;
        width: 52px;
        height: 52px;
        margin: 1.2rem 0 1.2rem 1.2rem;
        font-size: 1.3rem;
        align-self: start;
    }

    .service-content {
        grid-column: 2;
        grid-row: 2;
        padding: 1.2rem 1.2rem 1.2rem 0.8rem;
        align-self: center;
    }

    .service-content h3 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }

    .service-content p {
        font-size: 0.82rem;
        line-height: 1.5;
        color: #888;
    }

    .category-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
        margin-top: 2rem !important;
    }

    /* Service card without image (organic manure) */
    .service-card:not(:has(.service-image)) {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 1.2rem;
        gap: 1rem;
    }

    .service-card:not(:has(.service-image)) .service-icon {
        margin: 0;
        flex-shrink: 0;
    }

    .service-card:not(:has(.service-image)) .service-content {
        padding: 0;
    }
}

/* =============================================
   PORTFOLIO / GALLERY - MOBILE
   ============================================= */
@media screen and (max-width: 768px) {
    .portfolio {
        padding: 3rem 0;
    }

    .portfolio-slider {
        padding: 1rem 0 4.5rem;
    }

    .portfolio-item {
        height: 260px;
        border-radius: 16px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }

    .portfolio-item img {
        border-radius: 16px;
    }

    .portfolio-overlay {
        border-radius: 16px;
    }

    .portfolio-overlay h3 {
        font-size: 1.1rem;
    }

    .portfolio-overlay span {
        font-size: 0.8rem;
        background: rgba(201, 163, 111, 0.2);
        border: 1px solid rgba(201, 163, 111, 0.5);
        padding: 2px 10px;
        border-radius: 20px;
        margin-top: 4px;
    }

    .swiper-slide {
        opacity: 1;
        transform: scale(1);
    }

    .swiper-slide-active,
    .swiper-slide-next,
    .swiper-slide-prev {
        opacity: 1;
    }

    .swiper-pagination-bullet {
        width: 7px;
        height: 7px;
    }

    .swiper-pagination-bullet-active {
        width: 20px;
    }
}

/* =============================================
   TESTIMONIALS - MOBILE
   ============================================= */
@media screen and (max-width: 768px) {
    .testimonials {
        padding: 3rem 0;
    }

    .testimonials-slider {
        padding: 1rem 0 4rem;
    }

    .testimonial-card {
        padding: 1.8rem;
        border-radius: 16px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
        border: 1px solid rgba(201, 163, 111, 0.12);
    }

    .quote-icon {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    .testimonial-text {
        font-size: 0.88rem;
        line-height: 1.65;
    }

    .client-name {
        font-size: 1rem;
    }

    .client-role {
        font-size: 0.75rem;
    }
}

/* =============================================
   CONTACT SECTION - MOBILE
   ============================================= */
@media screen and (max-width: 768px) {
    .contact {
        padding: 3rem 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info .section-title {
        font-size: 1.7rem;
        text-align: left !important;
    }

    .contact-info {
        gap: 1.2rem;
    }

    /* Horizontal scroll chips for quick contact */
    .contact-quick-chips {
        display: flex;
        gap: 0.7rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .contact-quick-chips::-webkit-scrollbar {
        display: none;
    }

    .contact-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: #1a3c34;
        color: #fff;
        padding: 0.6rem 1.1rem;
        border-radius: 50px;
        white-space: nowrap;
        font-size: 0.8rem;
        font-weight: 600;
        text-decoration: none;
        box-shadow: 0 4px 15px rgba(26, 60, 52, 0.2);
        flex-shrink: 0;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .contact-chip:active {
        transform: scale(0.96);
    }

    .contact-chip.whatsapp {
        background: #25d366;
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
    }

    .contact-chip.phone {
        background: linear-gradient(135deg, #c9a36f, #b8860b);
        box-shadow: 0 4px 15px rgba(201, 163, 111, 0.3);
    }

    .contact-chip i {
        font-size: 0.9rem;
    }

    .contact-item {
        gap: 1rem;
        padding: 1rem;
        background: rgba(26, 60, 52, 0.03);
        border-radius: 12px;
        border: 1px solid rgba(26, 60, 52, 0.06);
    }

    .contact-icon {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        background: rgba(26, 60, 52, 0.08);
        color: #1a3c34;
        flex-shrink: 0;
    }

    .contact-item h3 {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
        font-family: 'Outfit', sans-serif;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #888;
    }

    .contact-item p,
    .contact-item p a {
        font-size: 0.9rem;
        color: #1a3c34;
        font-weight: 600;
    }

    .contact-form {
        padding: 1.8rem 1.2rem;
        border-radius: 20px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    }

    .form-group {
        margin-bottom: 1.3rem;
    }

    .form-group label {
        font-size: 0.72rem;
        margin-bottom: 0.4rem;
    }

    .form-input {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
        border-radius: 10px;
        border: 1.5px solid #eee;
        background: #fafaf8;
    }

    .form-input:focus {
        border-color: #c9a36f;
        box-shadow: 0 0 0 3px rgba(201, 163, 111, 0.15);
        background: #fff;
    }

    textarea.form-input {
        min-height: 110px;
    }

    .contact-form .btn-primary {
        width: 100%;
        padding: 1.1rem;
        font-size: 0.85rem;
        border-radius: 50px;
        background: linear-gradient(135deg, #1a3c34, #2c584e);
        box-shadow: 0 8px 25px rgba(26, 60, 52, 0.3);
        letter-spacing: 2px;
    }

    .social-links {
        margin-top: 1rem !important;
    }

    .social-link {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        background: rgba(26, 60, 52, 0.06);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #1a3c34;
        font-size: 1rem;
        transition: all 0.25s ease;
    }

    .social-link:active {
        transform: scale(0.92);
        background: rgba(26, 60, 52, 0.12);
    }
}

/* =============================================
   FOOTER - MOBILE
   ============================================= */
@media screen and (max-width: 768px) {
    .footer {
        padding-top: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding-bottom: 2rem;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-logo {
        justify-content: center;
        margin: 0 auto 1rem auto;
    }

    .footer-text {
        font-size: 0.85rem;
        line-height: 1.6;
        max-width: 280px;
        margin: 0 auto 1.5rem;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-socials a {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.08);
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .footer-links li a {
        font-size: 0.88rem;
        color: rgba(255, 255, 255, 0.7);
        padding: 0.25rem 0;
    }

    .footer-map {
        border-radius: 12px !important;
        height: 160px !important;
        width: 100%;
        overflow: hidden;
    }

    .footer-bar {
        padding: 1.2rem 0;
        font-size: 0.8rem;
        margin-bottom: 0;
    }
}

/* =============================================
   SECTION HEADERS - MOBILE
   ============================================= */
@media screen and (max-width: 768px) {
    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 0.72rem;
        letter-spacing: 2px;
        margin-bottom: 0.8rem;
    }
}

/* =============================================
   SCROLL PROGRESS - THICKER + COLORFUL ON MOBILE
   ============================================= */
@media screen and (max-width: 768px) {
    .scroll-progress {
        height: 3px;
        background: linear-gradient(to right, #c9a36f, #6b8e23, #c9a36f);
        background-size: 200% auto;
        animation: shine-bar 3s linear infinite;
    }

    @keyframes shine-bar {
        to {
            background-position: 200% center;
        }
    }
}

/* =============================================
   REVEAL ANIMATIONS - SMOOTHER ON MOBILE
   (Reduce motion for performance)
   ============================================= */
@media screen and (max-width: 768px) {
    .reveal {
        transform: translateY(20px) scale(0.98);
        filter: blur(0px);
        /* Remove blur on mobile for performance */
        transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
    }

    .reveal-left {
        transform: translateX(-20px);
        transition: all 0.6s ease;
    }

    .reveal-right {
        transform: translateX(20px);
        transition: all 0.6s ease;
    }
}

/* =============================================
   PRELOADER - MOBILE OPTIMIZATION
   ============================================= */
@media screen and (max-width: 768px) {
    .loader-name {
        font-size: 1.6rem;
    }

    .loader-highlight {
        letter-spacing: 3px;
        font-size: 0.82rem;
    }

    .loader-logo-wrapper {
        width: 85px;
        height: 85px;
    }

    .loader-logo-img {
        width: 60px;
        height: 60px;
    }
}

/* =============================================
   TOUCH-FRIENDLY TAP STATES
   ============================================= */
@media (pointer: coarse) {
    .service-card:active {
        transform: scale(0.98);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    }

    .btn:active {
        transform: scale(0.96) !important;
    }

    .nav-toggle:active {
        background: rgba(26, 60, 52, 0.12) !important;
    }

    /* Larger tap targets */
    .nav-link {
        padding: 0.5rem 0;
        display: block;
    }

    .footer-links a {
        padding: 0.4rem 0;
        display: block;
    }
}

/* =============================================
   SECTION SPACING MOBILE
   ============================================= */
@media screen and (max-width: 480px) {
    :root {
        --section-padding: 3rem 0;
        --header-height: 64px;
        --container-width: 92%;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    /* Services - even smaller screen */
    .service-card {
        border-radius: 14px;
    }

    .service-image {
        height: 160px;
    }

    .service-content h3 {
        font-size: 0.95rem;
    }

    /* Hero adjustments for very small screens */
    .hero-title {
        font-size: 1.9rem;
    }

    .hero-description {
        font-size: 0.82rem;
        display: block !important;
        max-width: 280px;
        opacity: 0.8;
    }

    /* Contact chips become 2-column grid */
    .contact-quick-chips {
        display: grid;
        grid-template-columns: 1fr 1fr;
        overflow: visible;
    }

    .contact-chip {
        justify-content: center;
    }
}

/* =============================================
   LANDSCAPE MOBILE
   ============================================= */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 0;
        height: auto;
        padding-bottom: calc(56px + 1.5rem);
    }

    .mobile-bottom-nav {
        height: 56px;
    }

    body {
        padding-bottom: 56px;
    }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =============================================
   SCROLLBAR HIDE FOR MOBILE
   ============================================= */
@media screen and (max-width: 768px) {
    ::-webkit-scrollbar {
        display: none;
    }

    * {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
}