/* 
   Responsive Stylesheet for Hotel Taj Palace
   Author: AI Developer
   Version: 1.0
*/

/* ===============================
   Media Queries
   =============================== */

/* For screens smaller than 1200px */
@media screen and (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 30px;
    }
    
    .rooms-grid,
    .facilities-grid,
    .values-grid,
    .features-grid,
    .contact-info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* For screens smaller than 992px */
@media screen and (max-width: 992px) {
    h1 {
        font-size: 36px;
    }
    
    h2 {
        font-size: 30px;
    }
    
    .navbar {
        padding: 15px 0;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .rooms-grid,
    .testimonial-grid,
    .mission-vision-grid,
    .team-grid,
    .gallery-grid,
    .faq-grid,
    .policy-grid,
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .facilities-grid,
    .values-grid,
    .features-grid,
    .contact-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .welcome-content,
    .about-content,
    .contact-content {
        flex-direction: column;
    }
    
    .welcome-text,
    .welcome-image,
    .about-text,
    .about-image,
    .contact-form,
    .contact-image {
        width: 100%;
    }
    
    .contact-image {
        margin-bottom: 40px;
    }
    
    .welcome-image {
        order: -1;
        margin-bottom: 30px;
    }
    
    .about-image {
        order: -1;
        margin-bottom: 30px;
    }
    
    .hero-content h1 {
        font-size: 42px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* For screens smaller than 768px */
@media screen and (max-width: 768px) {
    .dropdown.show .dropdown-menu, .dropdown-menu.show {
        position: absolute;
    }
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 26px;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 13px;
    }
    
    /* Navigation */
    .nav-container {
        position: relative;
    }
    
    .nav-toggle-label {
        display: block;
        position: relative;
        height: 25px;
        width: 30px;
        z-index: 1001; /* Higher z-index to stay above fullscreen nav */
    }
    
    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        display: block;
        background: var(--secondary-color);
        height: 3px;
        width: 100%;
        position: absolute;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .nav-toggle-label span {
        top: 11px;
    }
    
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        content: '';
    }
    
    .nav-toggle-label span::before {
        bottom: 8px;
    }
    
    .nav-toggle-label span::after {
        top: 8px;
    }
    
    /* Fullscreen mobile navigation - Modern style */
    nav {
        position: fixed; /* Changed from absolute to fixed */
        top: 0;
        left: 0;
        right: 0;
        bottom: 0; /* Full height */
        background-color: rgb(255, 255, 255); /* Semitransparent secondary color */
        width: 101%;
        max-width: 100%;
        height: 100vh; /* Full viewport height */
        transform: translateX(-100%); /* Slide in from left */
        transition: transform 0.4s ease;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 30px; /* Increased spacing between items */
        width: 100%;
        text-align: center; /* Center alignment */
        padding: 40px 20px;
    }
    
    .nav-menu li {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Modern bold links for mobile */
    .nav-menu li a {
        padding: 12px 0; /* Vertical padding only */
        display: inline-block; /* Changed from block to inline-block */
        opacity: 0;
        transition: opacity 0.15s ease;
        font-size: 24px; /* Larger font for modern look */
        font-weight: 600; /* Bold text */
        color: black; /* White text on dark background */
        letter-spacing: 1px;
    }

    .nav-menu li a:hover, 
    .nav-menu li.active a {
        color: var(--primary-color);
    }

    /* Show active state with underline only under text */
    .nav-menu li.active a::after {
        width: 100%; /* Full width of text only since we're using inline-block */
    }
    
    /* Show navigation when toggled */
    .nav-toggle:checked ~ nav {
        transform: translateX(0); /* Slide in */
        opacity: 1;
    }
    
    .nav-toggle:checked ~ nav a {
        opacity: 1;
        transition: opacity 0.25s ease 0.15s;
    }
    
    .nav-toggle:checked ~ .nav-toggle-label span {
        background: transparent;
    }
    
    .nav-toggle:checked ~ .nav-toggle-label span::before {
        transform: rotate(45deg);
        bottom: 0;
        background-color: black; /* White hamburger when menu is open */
    }
    
    .nav-toggle:checked ~ .nav-toggle-label span::after {
        transform: rotate(-45deg);
        top: 0;
        background-color: black; /* White hamburger when menu is open */
    }
    
    /* Bootstrap dropdown styling for mobile */
    .dropdown-menu {
        position: static; /* Not absolute */
        width: 100%;
        box-shadow: none;
        background-color: transparent;
        border: none;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        transform: none;
        transition: max-height 0.3s ease, visibility 0.3s ease;
        text-align: center;
        margin-top: 5px;
        padding: 0;
        opacity: 1;
    }
    
    .dropdown-toggle i {
        transition: transform 0.3s ease;
    }
    
    .dropdown.show .dropdown-toggle i {
        transform: rotate(180deg);
    }
    
    .dropdown.show .dropdown-menu,
    .dropdown-menu.show {
        max-height: 400px; /* Adjust as needed */
        visibility: visible;
        display: block;
        padding: 10px 0;
        margin-top: 15px;
        border-radius: 8px;
    }
    
    .dropdown-menu li a {
        padding: 12px 0;
        font-size: 18px; /* Slightly smaller than main links */
        font-weight: 500;
        color: rgba(0, 0, 0, 0.9);
        border-left: none;
    }
    
    .dropdown-menu li a:hover,
    .dropdown-menu li.active a {
        background-color: transparent;
        color: var(--primary-color);
        border-left: none;
    }
    
    /* Header top */
    .header-top {
        display: none;
    }
    
    /* Hero section */
    .hero {
        height: 500px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
    
    /* Grid sections */
    .rooms-grid,
    .facilities-grid,
    .testimonial-grid,
    .mission-vision-grid,
    .values-grid,
    .team-grid,
    .features-grid,
    .gallery-grid,
    .faq-grid,
    .contact-info-grid,
    .policy-grid,
    .options-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* For screens smaller than 576px */
@media screen and (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    .section-title {
        margin-bottom: 30px;
    }
    
    .hero {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 30px;
        margin-bottom: 15px;
    }
    
    .hero-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .page-header {
        padding: 40px 0;
    }
    
    .welcome, .rooms, .facilities, .testimonials, 
    .about-intro, .mission-vision, .values, .team, 
    .hotel-features, .gallery, .contact-info-section, 
    .contact-form-section, .map-section, .faq-section, 
    .booking-form, .reservation-policy, .alternative-options {
        padding: 50px 0;
    }
    
    .facility-item, .value-item, .feature, .contact-card, .policy-item {
        padding: 20px;
    }
    
    .form-container, .mission-box, .vision-box, 
    .testimonial-card, .faq-item, .option-card {
        padding: 25px;
    }
    
    .room-image {
        height: 200px;
    }
    
    .room-info {
        padding: 20px;
    }
    
    .policy-box {
        padding: 20px;
    }
    
    .map-container {
        height: 300px;
    }
}

/* CSS for Dropdown activation in mobile without JS */
@media screen and (max-width: 768px) {
    .dropdown-toggle:focus + .dropdown-menu,
    .dropdown-toggle:active + .dropdown-menu,
    .dropdown-menu:hover {
        opacity: 1;
        visibility: visible;
        height: auto;
    }
    
    .nav-menu {
        padding: 0;
    }
    
    .nav-menu > li > a {
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .dropdown-toggle {
        position: relative;
    }
    
    .dropdown-toggle .fa-chevron-down {
        transition: transform 0.3s;
    }
    
    .dropdown.active .fa-chevron-down {
        transform: rotate(180deg);
    }
}

/* Adding a CSS-only dropdown solution for mobile */
@media screen and (max-width: 768px) {

    
    .nav-menu .dropdown.active > a::after {
        transform: rotate(180deg);
    }
    
    .dropdown-toggle {
        pointer-events: none;
    }
    
    .dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    /* This will need JavaScript to toggle .active class,
       But since we're limited to CSS only, we'll use the :target pseudo-class as a workaround */
    
    .nav-menu .dropdown:target .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        height: auto;
    }
    
    .nav-toggle:checked ~ nav .dropdown:target > a::after {
        transform: rotate(180deg);
    }
}
