/* ==================== COMPREHENSIVE HOME PAGE RESPONSIVE ENHANCEMENTS ==================== */

/* Ensure proper viewport scaling */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Prevent horizontal scroll on all sections */
* {
    max-width: 100%;
    box-sizing: border-box;
}

/* ==================== SECTION TITLES & SUBTITLES ==================== */
.section-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.section-subtitle {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }

    .section-subtitle {
        font-size: clamp(0.9rem, 3vw, 1rem) !important;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: clamp(1.3rem, 6vw, 1.7rem) !important;
        margin-bottom: 0.5rem !important;
    }

    .section-subtitle {
        font-size: clamp(0.85rem, 3.5vw, 0.95rem) !important;
    }
}

/* ==================== FEATURES SECTION ==================== */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .features {
        padding: 3rem 1rem !important;
    }

    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .feature-card {
        padding: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    .feature-icons {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .features {
        padding: 2rem 0.75rem !important;
    }

    .feature-card {
        padding: 1.25rem !important;
    }
}

/* ==================== PROKOLPO MAP SECTION ==================== */
@media (max-width: 992px) {
    #prokolpoMapSection {
        padding: 40px 0 !important;
    }

    #prokolpoMapSection .main-section {
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .offer-card {
        width: 100% !important;
        margin-bottom: 2rem !important;
    }

    .map-section {
        width: 100% !important;
        min-height: 400px !important;
    }
}

@media (max-width: 768px) {
    #prokolpoMapSection {
        padding: 30px 0 !important;
        margin-top: 40px !important;
    }

    .offer-title {
        font-size: 1.5rem !important;
    }

    .plot-box {
        padding: 10px !important;
    }

    .plot-size {
        font-size: 1rem !important;
    }

    .map-section {
        padding: 15px !important;
        min-height: 350px !important;
    }
}

@media (max-width: 480px) {
    #prokolpoMapSection {
        padding: 25px 0 !important;
    }

    .offer-title {
        font-size: 1.3rem !important;
    }

    .plot-box {
        padding: 8px !important;
    }

    .category-label {
        font-size: 0.75rem !important;
        padding: 4px 10px !important;
    }

    .cta-bar {
        font-size: 0.9rem !important;
        padding: 10px !important;
    }
}

/* ==================== GALLERY SECTION ==================== */
@media (max-width: 768px) {
    #gallery {
        padding: 40px 0 !important;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {
    #gallery {
        padding: 30px 0 !important;
    }

    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .gallery-item {
        border-radius: 12px !important;
    }
}

/* ==================== VIDEO SECTION ==================== */
@media (max-width: 768px) {
    #video-section {
        padding: 40px 0 !important;
    }

    .carousel-wrapper {
        padding: 0 12px !important;
    }

    .video-card-item {
        min-width: 280px !important;
    }
}

@media (max-width: 480px) {
    #video-section {
        padding: 30px 0 !important;
    }

    .video-card-item {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .video-thumb {
        height: 160px !important;
    }
}

/* ==================== TESTIMONIAL SECTION ==================== */
@media (max-width: 768px) {
    #testimonials {
        padding: 50px 0 !important;
    }

    .carousel-wrapper {
        padding: 0 12px !important;
    }

    .testimonial-card {
        padding: 1.5rem !important;
        gap: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    #testimonials {
        padding: 40px 0 !important;
    }

    .testimonial-card {
        padding: 1.25rem !important;
        border-radius: 16px !important;
    }

    .testimonial-avatar {
        width: 60px !important;
        height: 60px !important;
    }
}

/* ==================== OTHER PROJECTS SECTION ==================== */
@media (max-width: 768px) {
    .other-projects {
        padding: 50px 0 !important;
    }

    .carousel-wrapper {
        padding: 0 12px !important;
    }

    .project-card {
        min-width: 260px !important;
    }
}

@media (max-width: 480px) {
    .other-projects {
        padding: 40px 0 !important;
    }

    .project-card {
        min-width: 280px !important;
        max-width: 100% !important;
    }
}

/* ==================== CHAIRMAN SECTION ==================== */
@media (max-width: 768px) {
    .chairman-section {
        padding: 50px 1rem !important;
    }

    .chairman-title {
        font-size: 1.8rem !important;
    }

    .chairman-quote {
        font-size: 3rem !important;
        top: 15px !important;
        left: 15px !important;
    }
}

@media (max-width: 480px) {
    .chairman-section {
        padding: 40px 0.75rem !important;
    }

    .chairman-title {
        font-size: 1.5rem !important;
    }

    .chairman-card {
        border-radius: 16px !important;
    }

    .chairman-image-container {
        height: 250px !important;
    }

    .chairman-content {
        padding: 20px !important;
    }

    .chairman-quote {
        font-size: 2.5rem !important;
        top: 10px !important;
        left: 10px !important;
    }

    .chairman-name {
        font-size: 1.3rem !important;
        margin-top: 15px !important;
    }

    .chairman-position {
        font-size: 0.9rem !important;
    }

    .chairman-message {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
}

/* ==================== CONTACT SECTION ==================== */
@media (max-width: 992px) {
    #contact {
        padding: 50px 0 !important;
    }

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

    .contact-info {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .contact-item {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    #contact {
        padding: 40px 0 !important;
    }

    .contact-form {
        padding: 1.5rem !important;
    }

    .contact-info {
        padding: 1.5rem !important;
        gap: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    #contact {
        padding: 30px 0 !important;
    }

    .contact-form {
        padding: 1.25rem 1rem !important;
    }

    .contact-info {
        padding: 1.25rem 1rem !important;
    }

    .contact-item {
        padding: 1rem !important;
    }

    .contact-icon {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
}

/* ==================== BUTTONS ==================== */
@media (max-width: 768px) {
    .btn {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.95rem !important;
        white-space: nowrap;
    }

    .btn-lg {
        padding: 0.875rem 1.75rem !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.625rem 1.25rem !important;
        font-size: 0.9rem !important;
        min-height: 44px; /* Touch-friendly */
    }

    .btn-lg {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.95rem !important;
    }

    .cta-buttons {
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .cta-buttons .btn {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ==================== CONTAINERS ==================== */
@media (max-width: 992px) {
    .container,
    .container-fluid {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .container,
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (max-width: 480px) {
    .container,
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* ==================== IMAGES & MEDIA ==================== */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    img {
        border-radius: 12px !important;
    }
}

/* ==================== CAROUSEL CONTROLS ==================== */
@media (max-width: 768px) {
    .carousel-btn {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.1rem !important;
        min-width: 44px; /* Touch-friendly */
        min-height: 44px;
    }

    .carousel-dot {
        width: 8px !important;
        height: 8px !important;
        min-width: 8px;
        min-height: 8px;
    }

    .carousel-dot.active {
        width: 24px !important;
        height: 8px !important;
    }
}

@media (max-width: 480px) {
    .carousel-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }
}

/* ==================== FORMS ==================== */
@media (max-width: 768px) {
    .form-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.75rem 1rem !important;
        min-height: 44px; /* Touch-friendly */
    }

    .form-label {
        font-size: 0.95rem !important;
        margin-bottom: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .form-control {
        font-size: 16px !important;
        padding: 0.625rem 0.875rem !important;
    }
}

/* ==================== UTILITY CLASSES ==================== */
@media (max-width: 768px) {
    .d-mobile-none {
        display: none !important;
    }

    .d-mobile-block {
        display: block !important;
    }

    .text-mobile-center {
        text-align: center !important;
    }
}

/* ==================== LANDSCAPE ORIENTATION ==================== */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        min-height: 100vh !important;
    }

    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .carousel-btn,
    .carousel-dots,
    .navbar,
    .btn,
    .contact-form {
        display: none !important;
    }

    section {
        page-break-inside: avoid;
    }
}

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

/* ==================== END RESPONSIVE ENHANCEMENTS ==================== */

