/* ===================================
   MOBILE RESPONSIVE STYLES
   Temple Website - Vaikunta Srinivas
   =================================== */

/* ===== GENERAL MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    .wrapper {
        overflow-x: hidden;
    }

    /* Prevent horizontal scroll */
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ===== TOP BAR MOBILE ===== */
@media (max-width: 768px) {
    .top-bar {
        height: auto;
        padding: 15px 0 !important;
    }

    .top-bar .row {
        flex-direction: column;
        align-items: center !important;
    }

    .top-bar .logo-img {
        height: 60px !important;
        margin: 5px 0;
    }

    .top-bar .header-text {
        font-size: 18px !important;
        white-space: normal !important;
        text-align: center;
        padding: 10px 15px;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .top-bar .logo-img {
        height: 50px !important;
    }

    .top-bar .header-text {
        font-size: 16px !important;
        padding: 8px 10px;
    }
}

/* ===== NAVIGATION MOBILE ===== */
@media (max-width: 991.98px) {
    .nav-bar {
        padding: 0 !important;
    }

    .nav-bar .navbar {
        padding: 10px 15px !important;
    }

    .nav-bar .navbar-brand {
        font-size: 18px;
    }

    .nav-bar .navbar-collapse {
        margin-top: 10px;
        background: #030f27;
        padding: 15px;
        border-radius: 5px;
    }

    .nav-bar .nav-item {
        margin: 5px 0;
    }

    .nav-bar .dropdown-menu {
        background: #1a1a2e !important;
        border: 1px solid #e47914;
        margin-left: 15px;
    }

    .nav-bar .dropdown-item {
        color: #ffffff !important;
        padding: 10px 15px;
    }

    .nav-bar .dropdown-item:hover {
        background: #e47914 !important;
        color: #030f27 !important;
    }
}

/* ===== CAROUSEL MOBILE ===== */
@media (max-width: 768px) {
    .carousel {
        height: 400px !important;
        min-height: 300px !important;
    }

    .carousel .carousel-caption {
        height: 400px !important;
        min-height: 300px !important;
        padding: 0 20px;
    }

    .carousel .carousel-caption h1 {
        font-size: 24px !important;
        margin-bottom: 15px !important;
        line-height: 1.3;
    }

    .carousel .carousel-caption p {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }

    .carousel .carousel-indicators {
        bottom: 10px;
    }

    .carousel .carousel-indicators li {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }
}

@media (max-width: 480px) {
    .carousel {
        height: 300px !important;
        min-height: 250px !important;
    }

    .carousel .carousel-caption {
        height: 300px !important;
        min-height: 250px !important;
    }

    .carousel .carousel-caption h1 {
        font-size: 20px !important;
        margin-bottom: 10px !important;
    }

    .carousel .carousel-caption p {
        font-size: 14px !important;
    }
}

/* ===== VIDEO SECTION MOBILE ===== */
@media (max-width: 768px) {
    .blinking-text {
        font-size: 16px !important;
        padding: 0 15px;
        line-height: 1.5;
    }

    .section-header h2 {
        font-size: 24px !important;
        padding: 0 15px;
    }

    .video-row {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .video-item {
        max-width: 100% !important;
        width: 100% !important;
    }

    .video-item iframe {
        height: 200px !important;
    }
}

@media (max-width: 480px) {
    .blinking-text {
        font-size: 14px !important;
    }

    .section-header h2 {
        font-size: 20px !important;
    }

    .video-item iframe {
        height: 180px !important;
    }
}

/* ===== ABOUT SECTION MOBILE ===== */
@media (max-width: 768px) {
    .about {
        padding: 30px 0 !important;
    }

    .about .about-img {
        margin-bottom: 25px;
    }

    .about .about-img img {
        width: 100%;
        height: auto !important;
    }

    .about .section-header p {
        font-size: 16px !important;
        padding: 0 15px;
        text-align: center;
    }

    .about .section-header h2 {
        font-size: 24px !important;
        padding: 0 15px;
    }

    .about .about-text {
        padding: 0 15px;
    }

    .about .about-text p {
        font-size: 14px !important;
        line-height: 1.6;
        text-align: justify;
    }

    .about .btn {
        width: 100%;
        margin-top: 15px !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}

/* ===== SERVICE/DASHAVATARAS SECTION MOBILE ===== */
@media (max-width: 768px) {
    .service {
        padding: 30px 0 !important;
    }

    .service .section-header p {
        font-size: 14px !important;
        line-height: 1.6;
        padding: 0 15px;
    }

    .service .row {
        margin: 0 !important;
    }

    .service .col-lg-4,
    .service .col-md-6 {
        padding: 0 15px;
        margin-bottom: 20px;
    }

    .service .service-item {
        margin-bottom: 0 !important;
    }

    .service .service-img img {
        width: 100%;
        height: auto;
    }

    .service .service-text {
        height: auto !important;
        min-height: 60px;
        padding: 15px 10px;
    }

    .service .service-text h3 {
        font-size: 18px !important;
        padding: 0 10px !important;
        width: calc(100% - 50px) !important;
        white-space: normal !important;
        line-height: 1.3;
    }

    .service .service-item a.btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 50px !important;
        flex-shrink: 0;
    }

    .service .service-overlay {
        padding: 15px !important;
    }

    .service .service-overlay p {
        font-size: 14px !important;
        line-height: 1.5;
    }
}

/* ===== TEMPLE TIMING SECTION MOBILE ===== */
@media (max-width: 768px) {
    .temple-timing {
        padding: 40px 0 !important;
    }

    .temple-timing .section-title {
        font-size: 24px !important;
        padding: 0 15px;
        margin-bottom: 20px !important;
    }

    .temple-timing .timing-box {
        width: 90% !important;
        padding: 15px !important;
        margin: 10px auto !important;
    }

    .temple-timing .timing-box h3 {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }

    .temple-timing .timing-box p {
        font-size: 16px !important;
        margin: 3px 0 !important;
    }

    .temple-timing .note {
        font-size: 14px !important;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .temple-timing .timing-box {
        width: 95% !important;
        padding: 12px !important;
    }

    .temple-timing .timing-box h3 {
        font-size: 18px !important;
    }

    .temple-timing .timing-box p {
        font-size: 14px !important;
    }
}

/* ===== BLOG/EVENTS SECTION MOBILE ===== */
@media (max-width: 768px) {
    .blog {
        padding: 30px 0 !important;
    }

    .blog .section-header h2 {
        font-size: 24px !important;
        padding: 0 15px;
    }

    .blog .row {
        margin: 0 !important;
    }

    .blog .col-lg-4,
    .blog .col-md-6 {
        padding: 0 15px;
        margin-bottom: 25px;
    }

    .blog .blog-item {
        margin-bottom: 0 !important;
    }

    .blog .blog-img img {
        width: 100%;
        height: auto;
    }

    .blog .blog-title {
        padding: 15px !important;
    }

    .blog .blog-title h3 {
        font-size: 18px !important;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .blog .blog-meta {
        padding: 0 15px 10px !important;
    }

    .blog .blog-meta p {
        font-size: 13px !important;
    }

    .blog .blog-text {
        padding: 0 15px 15px !important;
    }

    .blog .blog-text p {
        font-size: 14px !important;
        line-height: 1.6;
        text-align: justify !important;
    }

    .blog .btn {
        font-size: 20px !important;
        width: 40px !important;
        height: 40px !important;
    }
}

/* ===== FOOTER MOBILE ===== */
@media (max-width: 768px) {
    .footer {
        padding: 30px 0 !important;
    }

    .footer .row {
        margin: 0 !important;
    }

    .footer .col-md-6,
    .footer .col-lg-3 {
        padding: 0 15px;
        margin-bottom: 30px;
    }

    .footer .footer-contact h2,
    .footer .footer-link h2,
    .footer .newsletter h2 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }

    .footer .footer-contact p,
    .footer .footer-link a,
    .footer .newsletter p {
        font-size: 14px !important;
        line-height: 1.6;
    }

    .footer .footer-social {
        margin-top: 15px;
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    .footer .footer-social a {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }

    .footer .footer-link a {
        display: block;
        padding: 8px 0;
    }

    .footer .newsletter .form {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .footer .newsletter .form input {
        width: 100% !important;
        margin-bottom: 10px;
    }

    .footer .newsletter .form .btn {
        width: 100% !important;
        padding: 12px !important;
    }

    .footer .footer-menu {
        padding: 20px 15px !important;
    }

    .footer .f-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .footer .f-menu a {
        font-size: 13px !important;
        padding: 5px 0;
    }

    .footer .copyright {
        padding: 15px !important;
        text-align: center !important;
    }

    .footer .copyright .row {
        flex-direction: column;
    }

    .footer .copyright .col-md-6 {
        text-align: center !important;
        margin-bottom: 10px;
    }

    .footer .copyright p {
        font-size: 13px !important;
        margin: 5px 0 !important;
    }
}

/* ===== BACK TO TOP BUTTON MOBILE ===== */
@media (max-width: 768px) {
    .back-to-top {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
        right: 10px !important;
        bottom: 10px !important;
    }

    .back-to-top i {
        padding-top: 8px !important;
    }
}

/* ===== PAGE HEADER MOBILE ===== */
@media (max-width: 768px) {
    .page-header {
        padding: 40px 15px !important;
    }

    .page-header h2 {
        font-size: 28px !important;
        margin-bottom: 15px !important;
    }

    .page-header a {
        font-size: 16px !important;
        padding: 0 8px !important;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 30px 15px !important;
    }

    .page-header h2 {
        font-size: 24px !important;
    }

    .page-header a {
        font-size: 14px !important;
    }
}

/* ===== UTILITY CLASSES ===== */
@media (max-width: 768px) {
    /* Text alignment */
    .mobile-center {
        text-align: center !important;
    }

    /* Spacing utilities */
    .mobile-p-15 {
        padding: 15px !important;
    }

    .mobile-m-0 {
        margin: 0 !important;
    }

    /* Hide on mobile */
    .hide-mobile {
        display: none !important;
    }

    /* Show only on mobile */
    .show-mobile {
        display: block !important;
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .carousel {
        height: 350px !important;
    }

    .carousel .carousel-caption {
        height: 350px !important;
    }

    .carousel .carousel-caption h1 {
        font-size: 22px !important;
    }

    .carousel .carousel-caption p {
        font-size: 14px !important;
    }
}

/* ===== VERY SMALL DEVICES (< 360px) ===== */
@media (max-width: 360px) {
    .top-bar .header-text {
        font-size: 14px !important;
    }

    .section-header h2 {
        font-size: 18px !important;
    }

    .service .service-text h3 {
        font-size: 16px !important;
    }

    .blog .blog-title h3 {
        font-size: 16px !important;
    }

    .temple-timing .section-title {
        font-size: 20px !important;
    }
}

/* ===== TOUCH OPTIMIZATION ===== */
@media (max-width: 768px) {
    /* Increase touch target sizes */
    a, button, .btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Better tap highlighting */
    a, button {
        -webkit-tap-highlight-color: rgba(228, 121, 20, 0.3);
    }

    /* Prevent text selection on buttons */
    .btn, button {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    .animated {
        animation-duration: 0.8s !important;
    }

    /* Optimize images */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
    }
}
