/* ========================================
   THULIR ORGANICS - RESPONSIVE STYLES
   Mobile, Tablet, and Desktop Breakpoints
   ======================================== */

/* ========================================
   MOBILE - Extra Small Devices (< 576px)
   ======================================== */

@media (max-width: 575.98px) {
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }

    p { font-size: 0.95rem; }

    /* Hero Section */
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }

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

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

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-hero {
        width: 100%;
        text-align: center;
    }

    /* Navigation */
    .navbar-custom {
        padding: 0.75rem 0;
    }

    .brand-text {
        font-size: 0.85rem;
    }

    .logo-circle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .navbar-nav {
        text-align: center;
    }

    .navbar-nav .nav-link {
        margin: 0.5rem 0;
    }

    .btn-call-nav {
        width: 100%;
        margin-top: 1rem;
    }

    /* Sections */
    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Page Header */
    .page-header {
        min-height: 200px;
        margin-top: 60px;
    }

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

    /* Cards */
    .product-card {
        margin-bottom: 1.5rem;
    }

    .team-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .team-image img {
        width: 120px;
        height: 120px;
    }

    /* About Items */
    .about-item {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Contact Form */
    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .contact-info-card {
        margin-bottom: 1.5rem;
    }

    /* CTA Section */
    .cta-section {
        margin: 1.5rem;
        padding: 2rem 1rem !important;
    }

    .cta-section .col-lg-8 {
        margin-bottom: 1.5rem;
    }

    .cta-section .col-lg-4 {
        text-align: start !important;
    }

    /* Buttons */
    .btn-primary, .btn-light, .btn-outline-light {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Footer */
    .footer-section {
        padding: 2rem 0;
    }

    .footer-section .row {
        margin-bottom: 2rem;
    }

    /* Floating Buttons */
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        bottom: 20px;
        right: 15px;
    }

    .floating-btn.whatsapp {
        bottom: 85px;
    }

    .scroll-to-top {
        bottom: 155px;
        right: 15px;
        width: 50px;
        height: 50px;
    }

    /* Product Detail */
    .product-detail-card {
        padding: 1.5rem;
    }

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

    /* Gallery */
    .gallery-item {
        height: 250px;
    }

    /* Process Cards */
    .process-card {
        padding: 1.5rem;
    }

    /* Comparison Table */
    .table-responsive {
        font-size: 0.85rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
    }
}

/* ========================================
   SMALL DEVICES - Small (576px - 767.98px)
   ======================================== */

@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography */
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }

    /* Hero Section */
    .hero-title {
        font-size: 3rem;
    }

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

    /* Page Header */
    .page-header {
        min-height: 250px;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    /* Sections */
    .section-title {
        font-size: 2rem;
    }

    /* Product Cards - Grid adjustment */
    .product-card {
        margin-bottom: 1.5rem;
    }

    /* CTA Section */
    .cta-section {
        margin: 2rem;
        padding: 2rem;
    }

    .cta-section .btn {
        width: auto;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }

    /* Contact Info */
    .contact-info-card {
        margin-bottom: 1.5rem;
    }

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

/* ========================================
   MEDIUM DEVICES - Tablet (768px - 991.98px)
   ======================================== */

@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    h1 { font-size: 3.25rem; }
    h2 { font-size: 2.25rem; }

    /* Hero Section */
    .hero-title {
        font-size: 3.5rem;
    }

    /* Section Title */
    .section-title {
        font-size: 2.25rem;
    }

    /* Hero Buttons */
    .hero-buttons {
        flex-wrap: wrap;
    }

    /* Buttons */
    .btn-hero {
        padding: 12px 28px;
    }

    /* CTA Section */
    .cta-section {
        margin: 2rem;
    }

    .cta-section .col-lg-8 {
        margin-bottom: 1rem;
    }

    /* Floating Buttons */
    .floating-btn.whatsapp {
        bottom: 90px;
    }

    .scroll-to-top {
        bottom: 160px;
    }

    /* Product Detail */
    .product-detail-card {
        padding: 2rem;
    }

    .spec-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    /* Team Card */
    .team-card {
        gap: 1.5rem;
    }
}

/* ========================================
   LARGE DEVICES - Desktop (992px - 1199.98px)
   ======================================== */

@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Product Section */
    .product-card {
        margin-bottom: 1.5rem;
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Buttons */
    .btn-primary {
        padding: 12px 28px;
    }

    /* CTA Section */
    .cta-section {
        margin: 2.5rem;
    }
}

/* ========================================
   EXTRA LARGE DEVICES - Large Desktop (1200px+)
   ======================================== */

@media (min-width: 1200px) {
    .container, .container-lg {
        max-width: 1140px;
    }
}

/* ========================================
   VERY LARGE DEVICES (1400px+)
   ======================================== */

@media (min-width: 1400px) {
    .container, .container-lg, .container-xl {
        max-width: 1320px;
    }

    /* Hero Title */
    .hero-title {
        font-size: 5rem;
    }

    /* Buttons */
    .btn-hero {
        padding: 16px 40px;
        font-size: 1.125rem;
    }
}

/* ========================================
   LANDSCAPE ORIENTATION
   ======================================== */

@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 80vh;
    }

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

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

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .hero-buttons {
        flex-direction: row;
        gap: 1rem;
    }
}

/* ========================================
   HIGH RESOLUTION DEVICES (High DPI)
   ======================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ========================================
   TOUCH DEVICES
   ======================================== */

@media (hover: none) and (pointer: coarse) {
    .btn {
        padding: 12px 28px;
        min-height: 44px;
        min-width: 44px;
    }

    .floating-btn {
        width: 60px;
        height: 60px;
    }

    a {
        -webkit-tap-highlight-color: rgba(46, 125, 50, 0.2);
    }

    button {
        -webkit-tap-highlight-color: rgba(46, 125, 50, 0.2);
    }

    /* Remove hover effects on touch devices */
    .product-card:hover {
        transform: none;
    }

    .benefit-card:hover {
        transform: none;
    }

    .testimonial-card:hover {
        transform: none;
    }
}

/* ========================================
   PRINT MEDIA
   ======================================== */

@media print {
    .navbar-custom,
    .floating-btn,
    .scroll-to-top,
    .scroll-indicator,
    footer {
        display: none !important;
    }

    body {
        background: white;
    }

    .page-header {
        page-break-after: avoid;
    }

    .product-card,
    .benefit-card,
    .testimonial-card {
        page-break-inside: avoid;
    }

    a {
        color: var(--primary-color);
        text-decoration: underline;
    }
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #E0E0E0;
        --text-light: #B0B0B0;
        --border-color: #333333;
        --bg-light: #2a2a2a;
        --bg-lighter: #252525;
    }

    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }

    .navbar-custom {
        background: rgba(30, 30, 30, 0.95);
    }

    .product-card,
    .benefit-card,
    .testimonial-card,
    .mission-card,
    .value-card,
    .team-card,
    .contact-info-card,
    .contact-form-wrapper,
    .connect-card,
    .process-card {
        background: #2a2a2a;
        color: var(--text-color);
    }

    .form-control-custom {
        background: #333333;
        border-color: #444444;
        color: var(--text-color);
    }

    .form-control-custom:focus {
        background: #3a3a3a;
        border-color: var(--primary-color);
    }

    .accordion-button {
        background: #2a2a2a;
        color: var(--text-color);
        border-color: #444444;
    }

    .about-item {
        border-bottom-color: #333333;
    }

    .benefits-list li {
        border-bottom-color: #333333;
    }

    .spec-item {
        background: #333333;
    }

    /* Comparison table */
    .comparison-table tbody tr:hover {
        background: #333333;
    }

    .comparison-table tbody tr:last-child td {
        border-bottom-color: #333333;
    }

    .comparison-table th,
    .comparison-table td {
        border-bottom-color: #333333;
    }

    /* Accordion */
    .accordion-body {
        background: #252525;
    }
}

/* ========================================
   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;
    }
}

/* ========================================
   FOCUS VISIBLE (Keyboard Navigation)
   ======================================== */

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));
}

/* Firefox */
* {
    scrollbar-color: linear-gradient(180deg, var(--primary-color), var(--secondary-color)) var(--bg-light);
    scrollbar-width: thin;
}

/* ========================================
   UTILITY BREAKPOINT HELPERS
   ======================================== */

.d-none-mobile {
    display: none;
}

@media (min-width: 768px) {
    .d-none-mobile {
        display: block !important;
    }

    .d-none-tablet {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .d-none-desktop {
        display: none !important;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   CONTAINER QUERIES (CSS Grid Enhancement)
   ======================================== */

@supports (container-type: inline-size) {
    .product-grid {
        container-type: inline-size;
    }

    @container (min-width: 400px) {
        .product-card {
            padding: 1.5rem;
        }
    }
}

/* ========================================
   ANIMATION DELAYS
   ======================================== */

[data-aos*="delay-1"] {
    animation-delay: 0.1s;
}

[data-aos*="delay-2"] {
    animation-delay: 0.2s;
}

[data-aos*="delay-3"] {
    animation-delay: 0.3s;
}

[data-aos*="delay-4"] {
    animation-delay: 0.4s;
}

[data-aos*="delay-5"] {
    animation-delay: 0.5s;
}
