/* ====================================
   Responsive Design
   ==================================== */

/* Tablets and smaller desktops */
@media screen and (max-width: 1200px) {
    .carousel-nav {
        bottom: 120px; /* Increase separation from content */
        gap: 15px;
        z-index: 10; /* Ensure it's on top */
    }

    .carousel-prev,
    .carousel-next {
        width: 44px; /* Slightly smaller than desktop */
        height: 44px;
        font-size: 22px;
    }

    .carousel-scroll {
        bottom: 20px; /* Adjust scroll indicator position */
        font-size: 11px;
        z-index: 5; /* Below navigation but above content */
    }



    .carousel-title {
        font-size: 48px;
    }

    .carousel-subtitle {
        font-size: 20px;
    }

    .section-title {
        font-size: 36px;
    }

    .nav-menu {
        gap: 25px;
        margin-right: 20px;
    }

    .app-content {
        gap: 40px;
    }

    .sermon-card {
        grid-template-columns: 1fr;
    }

    .sermon-content {
        padding: 30px;
    }
}

/* Tablets and Mobile */
@media screen and (max-width: 1024px) {
    :root {
        --section-padding: 60px 0;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 20px;
        gap: 0;
        transition: var(--transition);
        overflow-y: auto;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu > li > a {
        display: block;
        padding: 15px 0;
        position: relative;
    }

    /* Mobile dropdown indicator - hide on mobile since all items are expanded */
    .dropdown > a::after {
        display: none;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: var(--bg-light);
        max-height: 500px;
        overflow: visible;
        padding-left: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-left: 3px solid var(--primary-color);
        margin-left: 15px;
    }

    .dropdown-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        background-color: rgba(255, 255, 255, 0.5);
    }

    .dropdown-menu li a {
        padding: 12px 15px !important;
        font-size: 14px;
        color: var(--primary-color) !important;
        font-weight: 500;
    }

    /* All dropdown menus always visible on mobile */
    .nav-menu .dropdown .dropdown-menu {
        max-height: 500px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        position: static !important;
        transform: none !important;
    }

    .dropdown-menu li {
        border-bottom: none;
    }

    .dropdown-menu li a {
        padding: 10px 0;
        font-size: 14px;
    }

    .nav-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-carousel {
        height: 50vh;
        min-height: 350px;
    }

    .carousel-content {
        padding: 0 15px 100px 15px; /* Adjust padding for tablet */
    }

    .carousel-title {
        font-size: 28px;
    }

    .carousel-subtitle {
        font-size: 16px;
    }

    .carousel-buttons {
        flex-direction: column;
        align-items: center;
    }

    .carousel-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .section-title {
        font-size: 32px;
    }

    /* Adjust carousel navigation for tablets */
    .carousel-nav {
        bottom: 120px; /* Increase separation from scroll indicator */
        gap: 15px;
    }

    .carousel-prev,
    .carousel-next {
        width: 44px; /* Slightly smaller than desktop */
        height: 44px;
        font-size: 22px;
    }

    .carousel-scroll {
        bottom: 20px; /* Adjust scroll indicator position */
        font-size: 11px;
    }

    .section-description {
        font-size: 16px;
    }

    .about-grid,
    .connected-grid,
    .events-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .app-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .app-buttons {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 30px;
    }
}

/* Desktop - Standard Navigation */
@media screen and (min-width: 1025px) {
    .mobile-menu-toggle {
        display: none;
    }

    .nav-menu {
        display: flex;
    }
}

/* Mobile devices */
@media screen and (max-width: 480px) {
    .carousel-title {
        font-size: 28px;
    }

    .carousel-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 13px;
    }

    .about-card,
    .connected-card {
        padding: 30px 20px;
    }

    .service-time {
        padding: 25px;
    }

    /* Fix carousel navigation overlap on mobile */
    .hero-carousel {
        height: 60vh; /* Reduce height on mobile for better spacing */
        min-height: 400px;
    }

    .carousel-content {
        padding: 0 15px 160px 15px; /* More bottom padding on mobile for navigation */
    }

    .carousel-nav {
        bottom: 140px; /* Move navigation even higher on mobile */
        gap: 12px; /* Tighter spacing between nav elements */
        z-index: 10; /* Ensure it's on top of content */
    }

    .carousel-prev,
    .carousel-next {
        width: 36px; /* Even smaller buttons on mobile */
        height: 36px;
        font-size: 18px;
    }

    .carousel-scroll {
        bottom: 15px; /* Position scroll indicator at very bottom */
        font-size: 9px; /* Smaller text on mobile */
        letter-spacing: 1px;
    }

    .service-time h3 {
        font-size: 20px;
    }

    .service-time p {
        font-size: 14px;
    }

    .event-card {
        padding: 20px;
    }

    .event-date {
        width: 60px;
        height: 60px;
    }

    .date-day {
        font-size: 24px;
    }

    .app-image img {
        max-width: 300px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .social-links {
        justify-content: center;
    }
}

/* Very small devices */
@media screen and (max-width: 360px) {
    .container {
        padding: 0 15px;
    }

    .carousel-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 24px;
    }
}

/* Large desktop screens */
@media screen and (min-width: 1440px) {
    .hero-carousel {
        max-height: 900px;
    }


}
