/* ================= HERO SECTION ================= */
.hero {
    height: calc(100dvh - 70px);        /* Fits screen minus navbar */
    min-height: calc(100vh - 70px);
    min-height: -webkit-fill-available; /* iOS Safari fix */

    margin-top: 70px;
    position: relative;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

    transition: opacity 0.5s ease-in-out;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;

    will-change: opacity, transform;
}

/* iOS Safari specific fix */
@supports (-webkit-touch-callout: none) {
    .hero {
        height: calc(100vh - 70px);
    }
}

/* Overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4),
        rgba(0, 0, 0, 0.6)
    );
    z-index: 1;
}

/* Content */
.hero-content {
    position: relative;
    z-index: 2;

    max-width: 90%;
    width: 700px;

    text-align: center;
    padding: clamp(20px, 5vw, 30px);

    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Headings */
.hero-content h2 {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    margin-bottom: 0.5rem;
    opacity: 0.9;
    font-weight: 400;
}

.hero-content h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 1rem;
    line-height: 1.1;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: clamp(0.95rem, 3.5vw, 1.2rem);
    line-height: 1.5;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}


/* Buttons */
.cta-button {
    display: inline-block;
    background: #ff6b35;
    color: white;
    padding: clamp(12px, 3vw, 15px) clamp(25px, 4vw, 30px);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    margin: 8px;
    border: none;
    cursor: pointer;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    min-height: 44px;
    min-width: 140px;
    text-align: center;
    line-height: normal;
    -webkit-tap-highlight-color: transparent;
}

.cta-button:hover,
.cta-button:focus {
    background: #e55a2b;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    outline: 2px solid white;
    outline-offset: 2px;
}

.cta-button:active {
    transform: translateY(-1px);
}

/* Button container */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 1.5rem;
}

/* ================= SLIDER CONTROLS ================= */
.slide-indicators {
    position: absolute;
    bottom: clamp(20px, 4vw, 30px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: clamp(8px, 2vw, 10px);
    z-index: 10;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    -webkit-tap-highlight-color: transparent;
}

.slide-indicator {
    width: clamp(10px, 3vw, 12px);
    height: clamp(10px, 3vw, 12px);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.slide-indicator.active {
    background: white;
    transform: scale(1.2);
}

.slide-indicator:hover,
.slide-indicator:focus {
    background: rgba(255, 255, 255, 0.5);
    outline: 2px solid white;
    outline-offset: 2px;
}

.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    border-radius: 50%;
    font-size: clamp(18px, 4vw, 24px);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.7;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.slide-arrow:hover,
.slide-arrow:focus {
    background: rgba(0, 0, 0, 0.6);
    opacity: 1;
    outline: 2px solid white;
    outline-offset: 2px;
}

.slide-prev {
    left: clamp(10px, 3vw, 20px);
}

.slide-next {
    right: clamp(10px, 3vw, 20px);
}

/* Hide arrows on very small screens */
@media (max-width: 360px) {
    .slide-arrow {
        display: none;
    }
}

/* iOS specific fixes for slider */
@supports (-webkit-touch-callout: none) {
    .hero {
        -webkit-backface-visibility: hidden;
        -webkit-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
    }
    
    .slide-arrow {
        opacity: 0.9;
        background: rgba(0, 0, 0, 0.5);
    }
    
    .slide-indicator {
        width: clamp(12px, 3.5vw, 14px);
        height: clamp(12px, 3.5vw, 14px);
    }
    
    .cta-button {
        min-height: 48px;
        min-width: 150px;
    }
}

/* ================= BANNER BETWEEN HERO AND DIFFERENCE ================= */
.difference-banner {
    text-align: center;
    padding: clamp(40px, 8vw, 60px) 20px;
    margin-top: -40px;
    background: #f9f9f9;
    color: #333;
}

.difference-banner h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 15px;
    font-weight: 600;
}

.difference-banner p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    opacity: 0.85;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ================= SECTION 2 : WHAT MAKES US DIFFERENT ================= */
.difference-section {
    position: relative;
    padding: clamp(60px, 10vw, 100px) 20px;
    margin-top: -50px;
    background-image: url("/assets/aboutus.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* Dark overlay */
.difference-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("/assets/aboutus.jpg");
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 1;
}

/* Content */
.difference-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Title */
.section-title {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.section-subtitle {
    font-size: clamp(1rem, 3vw, 1.15rem);
    opacity: 0.9;
    margin-bottom: clamp(40px, 8vw, 65px);
    color: #ffffff;
}

/* Grid */
.difference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(20px, 4vw, 30px);
    padding: 0 10px;
}

/* Cards */
.difference-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 20px;
    padding: clamp(30px, 5vw, 40px) clamp(20px, 4vw, 28px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Hover only on non-touch devices */
@media (hover: hover) and (pointer: fine) {
    .difference-card:hover {
        transform: translateY(-12px);
        box-shadow: 0 22px 50px rgba(0, 0, 0, 0.25);
    }
}

/* Icons */
.difference-icon {
    width: clamp(60px, 10vw, 70px);
    height: clamp(60px, 10vw, 70px);
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a7c59, #2d5a27);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.difference-icon i {
    font-size: clamp(22px, 4vw, 28px);
    color: #ffffff;
}

/* Card text */
.difference-card h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: #2d5a27;
    margin-bottom: 12px;
    font-weight: 600;
}

.difference-card p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.6;
    color: #555;
    margin-top: auto;
}

/* ================= PRODUCTS SECTION ================= */
.products {
    padding: clamp(60px, 8vw, 90px) 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: #2f4f2f;
}

.section-header p {
    color: #555;
}

/* Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

/* Card */
.product-card {
    position: relative;
    height: 380px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    -webkit-tap-highlight-color: transparent;
}

/* Image */
.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

/* Overlay */
.product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2));
    color: white;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform: translateY(45%);
    transition: transform 0.5s ease;
}

/* Desktop Hover */
@media (hover: hover) and (pointer: fine) {
    .product-card:hover img {
        transform: scale(1.08);
    }

    .product-card:hover .product-overlay {
        transform: translateY(0);
    }
}

/* ✅ MOBILE TAP HOVER */
@media (hover: none) and (pointer: coarse) {
    .product-card:focus-within .product-overlay,
    .product-card:active .product-overlay {
        transform: translateY(0);
    }

    .product-card:focus-within img,
    .product-card:active img {
        transform: scale(1.05);
    }
}

/* Text */
.product-overlay h3 {
    font-size: 1.5rem;
}

.product-overlay span {
    color: #ffdd99;
}

.product-overlay p {
    font-size: 0.95rem;
}

/* Arrow */
.arrow-btn {
    margin-top: 15px;
    font-size: 2rem;
    color: #ffdd99;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.arrow-btn:hover {
    transform: translateX(10px);
}

/* ================= PROCESS SECTION ================= */
.process-section {
    background: #f1f6ee;
    padding: clamp(60px, 8vw, 90px) 20px;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 4vw, 30px);
    padding: 0 15px;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    gap: clamp(15px, 3vw, 20px);
}

.timeline-step span {
    background: #7bbf4a;
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    width: clamp(35px, 8vw, 40px);
    height: clamp(35px, 8vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.timeline-step h4 {
    margin-bottom: 5px;
    color: #2f4f2f;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 600;
}

.timeline-step p {
    color: #555;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.6;
}

.process-btn {
    display: block;
    margin: clamp(30px, 6vw, 50px) auto 0;
    width: fit-content;
    padding: clamp(10px, 2vw, 12px) clamp(20px, 4vw, 28px);
    border-radius: 25px;
    background: linear-gradient(135deg, #7bbf4a, #a4d37f);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 600;
    border: none;
    cursor: pointer;
    min-height: 44px;
    text-align: center;
    line-height: normal;
}

.process-btn:hover,
.process-btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(123, 191, 74, 0.3);
    outline: 2px solid #7bbf4a;
    outline-offset: 2px;
}

/* ================= OUR STORY SECTION ================= */
.our-story-bg {
    position: relative;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: url("/assets/aboutus.jpg") center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(30px, 6vw, 40px) 20px;
    background-attachment: scroll;
}

/* Desktop-only parallax */
@media (min-width: 1024px) {
    .our-story-bg {
        background-attachment: fixed;
    }
}

/* Dark overlay */
.story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(0,0,0,0.55),
        rgba(0,0,0,0.65)
    );
}

/* Content */
.story-content {
    position: relative;
    max-width: 90%;
    width: 900px;
    color: #fff;
    z-index: 2;
    animation: fadeUp 1.2s ease;
}

/* Main Heading */
.story-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    letter-spacing: clamp(1px, 1vw, 3px);
    margin-bottom: clamp(20px, 4vw, 30px);
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Text */
.story-content p {
    font-size: clamp(1rem, 3vw, 1.25rem);
    line-height: 1.8;
    margin-bottom: clamp(20px, 4vw, 30px);
    color: #f1f1f1;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Highlight lines */
.story-content h3 {
    font-size: clamp(1.1rem, 3.5vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 8px;
    color: #d8e6c8;
}

.story-content h2 {
    font-size: clamp(1.5rem, 5vw, 2.125rem);
    color: #9ddc6f;
    margin-bottom: clamp(25px, 5vw, 40px);
    font-weight: 600;
}

/* Button */
.story-btn {
    display: inline-block;
    padding: clamp(12px, 3vw, 16px) clamp(25px, 5vw, 40px);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid #9ddc6f;
    transition: all 0.4s ease;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    min-height: 44px;
    text-align: center;
    line-height: normal;
}

.story-btn:hover,
.story-btn:focus {
    background: #9ddc6f;
    color: #1f3d1f;
    transform: translateY(-5px);
    outline: none;
}

/* ================= COMMUNITY SECTION ================= */
.community-section {
    background: #ffffff;
    text-align: center;
    padding: clamp(60px, 8vw, 90px) 20px;
}

.community-text {
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.8;
    color: #555;
    font-size: clamp(1rem, 3vw, 1.125rem);
    padding: 0 15px;
}

.community-cta-text {
    margin-top: clamp(20px, 4vw, 25px);
    font-weight: 500;
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    color: #2f4f2f;
}

.community-btn {
    display: inline-block;
    margin-top: clamp(20px, 4vw, 25px);
    padding: clamp(10px, 2vw, 12px) clamp(20px, 4vw, 30px);
    border-radius: 25px;
    border: 2px solid #7bbf4a;
    color: #7bbf4a;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    min-height: 44px;
    text-align: center;
    line-height: normal;
    background: transparent;
    cursor: pointer;
}

.community-btn:hover,
.community-btn:focus {
    background: #7bbf4a;
    color: #fff;
    transform: translateY(-3px);
    outline: none;
}

/* ================= TESTIMONIAL SECTION ================= */
.testimonial-section {
    background: #f1f6ee;
    text-align: center;
    padding: clamp(60px, 8vw, 90px) 20px;
}

blockquote {
    max-width: 700px;
    margin: 0 auto;
    font-style: italic;
    font-size: clamp(1rem, 3vw, 1.125rem);
    color: #444;
    line-height: 1.8;
    padding: 0 15px;
}

blockquote span {
    display: block;
    margin-top: clamp(10px, 3vw, 15px);
    font-size: clamp(0.85rem, 2.5vw, 0.9375rem);
    color: #666;
    font-style: normal;
    font-weight: 500;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= RESPONSIVE MEDIA QUERIES ================= */

/* Extra small devices (phones, 0-480px) */
@media (max-width: 480px) {
    .hero {
        margin-top: 60px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
    }
    
    .difference-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Small devices (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .difference-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .story-content h1 {
        font-size: 3.5rem;
    }
}

/* Medium devices (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-content {
        max-width: 80%;
    }
    
    .difference-grid,
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large devices (1025px and up) */
@media (min-width: 1025px) {
    .hero-content {
        max-width: 700px;
    }
    
    .difference-grid,
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero,
    .product-card img,
    .product-overlay,
    .difference-card,
    .story-content,
    .process-btn,
    .community-btn,
    .story-btn,
    .arrow-btn,
    .slide-indicator,
    .slide-arrow {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    
    .hero-loading::after,
    .hero-loading-ios::after {
        animation: none;
        display: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .hero-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .cta-button {
        border: 2px solid white;
    }
    
    .difference-card {
        border: 2px solid #2d5a27;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .difference-banner {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .difference-banner p {
        color: #cccccc;
    }
    
    .community-section {
        background: #1a1a1a;
    }
    
    .community-text,
    .community-cta-text {
        color: #cccccc;
    }
    
    .testimonial-section {
        background: #2a2a2a;
    }
    
    blockquote {
        color: #ffffff;
    }
    
    blockquote span {
        color: #aaaaaa;
    }
}

/* Print styles */
@media print {
    .hero,
    .our-story-bg {
        min-height: auto;
        height: auto;
        background: white !important;
        color: black !important;
        margin-top: 0;
    }
    
    .hero-overlay,
    .story-overlay,
    .difference-overlay,
    .slide-indicators,
    .slide-arrow,
    .hero-loading::after,
    .hero-loading-ios::after {
        display: none !important;
    }
    
    .hero-content,
    .story-content {
        color: black !important;
        position: static;
        transform: none !important;
    }
    
    .cta-button,
    .story-btn,
    .process-btn,
    .community-btn {
        display: none !important;
    }
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
    .hero,
    .our-story-bg {
        min-height: -webkit-fill-available;
    }
}

/* Firefox-specific fixes */
@-moz-document url-prefix() {
    .hero,
    .our-story-bg {
        scroll-behavior: auto;
    }
}

/* Edge-specific fixes */
@supports (-ms-ime-align: auto) {
    .hero-content,
    .story-content {
        width: 100%;
    }
}

/* Mobile landscape */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 40px 0;
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .hero-content h1 {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
    
    .slide-indicators {
        bottom: 15px;
    }
    
    .slide-arrow {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* Fix for very large screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
}