/* 
   Responsive Stylesheet for The Ridgeline Wedding & Event Venue
   Author: Brady Miller
   Version: 1.0
*/

/* ===== MEDIA QUERIES ===== */

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    /* Gallery adjustments */
    .gallery-masonry {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero .tagline {
        font-size: 1.3rem;
    }
    
    .welcome-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .welcome-image {
        order: -1;
    }
    
    .header-container {
        padding: 1rem;
    }
    
    .logo {
        max-width: 140px;
    }
    
    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1001;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-right: 0;
    }
    
    .hamburger {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--primary-color);
        position: relative;
        transition: background-color 0.3s ease;
    }
    
    .hamburger:before,
    .hamburger:after {
        content: '';
        position: absolute;
        width: 24px;
        height: 2px;
        background-color: var(--primary-color);
        transition: all 0.3s ease;
    }
    
    .hamburger:before {
        top: -8px;
    }
    
    .hamburger:after {
        bottom: -8px;
    }
    
    .menu-toggle.active .hamburger {
        background-color: transparent;
    }
    
    .menu-toggle.active .hamburger:before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .menu-toggle.active .hamburger:after {
        transform: rotate(-45deg);
        bottom: 0;
    }
    
    .main-nav .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: white;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 2rem 0;
    }
    
    .main-nav .nav-links.active {
        right: 0;
    }
    
    .main-nav .nav-links li {
        margin: 1.5rem 0;
        width: 100%;
        text-align: center;
    }
    
    .main-nav .nav-links a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.1rem;
    }
    
    body {
        padding-top: 70px;
    }
    
    .page-banner {
        margin-top: 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .tagline {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-info {
        grid-template-columns: 1fr;
    }
    
    .footer-logo {
        margin: 0 auto 2rem;
    }
    
    .footer-contact, .footer-links, .footer-social {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    /* Gallery adjustments */
    .gallery-masonry {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        grid-gap: 12px;
    }
    
    .gallery-item {
        height: 220px;
    }
    
    /* Video modal adjustments */
    .modal-content {
        width: 95%;
        max-width: 700px;
    }
    
    /* Venue page adjustments */
    .space-card, .space-card.reverse {
        flex-direction: column;
        gap: 2rem;
    }
    
    .amenities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .package-card.featured {
        transform: none;
    }
    
    .package-card.featured:hover {
        transform: translateY(-10px);
    }
    
    /* Venue overview improvements */
    .venue-overview, .overview-content {
        display: block;
        padding: 3rem 0;
    }
    
    .overview-image {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .overview-image img {
        width: 100%;
        max-width: 500px;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .overview-text p {
        margin-bottom: 1.5rem;
        line-height: 1.6;
        font-size: 1rem;
        text-align: left;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        width: 95%;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.9rem;
    }
    
    .page-banner {
        height: 300px;
        margin-top: 90px;
    }
    
    .banner-content h1 {
        font-size: 2.2rem;
    }
    
    /* Gallery adjustments */
    .gallery-filter {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 15px;
        font-size: 0.85rem;
        margin: 0 2px 8px;
    }
    
    .gallery-masonry {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        grid-gap: 10px;
    }
    
    .gallery-item {
        height: 180px;
    }
    
    .gallery-info h3 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }
    
    .gallery-info p {
        font-size: 0.8rem;
        margin-bottom: 0.7rem;
    }
    
    .gallery-zoom, .video-play {
        width: 40px;
        height: 40px;
        line-height: 40px;
    }
    
    /* Video modal adjustments */
    .video-modal .modal-content {
        width: 95%;
    }
    
    #modal-video {
        width: 100%;
        height: auto;
    }
    
    .close-modal {
        top: -35px;
        right: 0;
        font-size: 1.8rem;
    }
    
    /* Fix for no-scroll body when modal is open */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Amenities grid */
    .amenities-grid {
        grid-template-columns: 1fr;
    }
    
    /* Venue overview improvements */
    .venue-overview {
        padding: 2.5rem 0;
    }
    
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    .overview-image {
        margin-bottom: 1.5rem;
    }
    
    .overview-image img {
        max-width: 100%;
    }
    
    .overview-text p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        letter-spacing: normal;
        word-spacing: normal;
    }
    
    .header-container {
        padding: 0.6rem 1rem;
    }
    
    .logo {
        max-width: 120px;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .tagline {
        font-size: 1.1rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .welcome, .features, .cta-section, .gallery-section {
        padding: 4rem 0;
    }
    
    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    /* Gallery adjustments */
    .gallery-masonry {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        grid-gap: 8px;
    }
    
    .gallery-item {
        height: 140px;
        border-radius: 6px;
    }
    
    .gallery-info {
        padding: 0.5rem;
    }
    
    .gallery-info h3 {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    
    .gallery-info p {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .gallery-zoom, .video-play {
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 0.9rem;
    }
    
    /* Video modal adjustments */
    .close-modal {
        top: -30px;
        right: 0;
        font-size: 1.5rem;
    }
    
    /* Page banner */
    .page-banner {
        height: 250px;
        margin-top: 80px;
    }
    
    .banner-content h1 {
        font-size: 1.8rem;
    }
    
    /* Fix for very small screens */
    @media (max-width: 360px) {
        .gallery-masonry {
            grid-template-columns: 1fr;
        }
        
        .gallery-item {
            height: 180px;
        }
        
        .overview-text p {
            font-size: 0.9rem;
        }
        
        .section-header h2 {
            font-size: 1.6rem;
        }
    }
    
    /* Critical fix for stretched text on mobile */
    p {
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
        letter-spacing: normal !important;
        word-spacing: normal !important;
    }
    
    /* Venue overview specific fixes */
    .venue-overview {
        padding: 2rem 0;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .section-header p.lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-header .divider {
        margin: 0.5rem auto 1rem;
    }
    
    .overview-content {
        display: flex;
        flex-direction: column;
    }
    
    .overview-image {
        order: -1;
        margin-bottom: 1.5rem;
    }
    
    .overview-image img {
        width: 100%;
        height: auto;
        max-height: none;
        border-radius: 6px;
    }
    
    .overview-text p {
        font-size: 0.95rem;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
        text-align: left;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
    }
    
    /* Fix for gallery page */
    .gallery-section .section-header p {
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Specific fixes for venue.html */
    .venue-overview .overview-content {
        display: block;
    }
    
    .venue-overview .overview-text,
    .venue-overview .overview-image {
        width: 100%;
        float: none;
    }
    
    .venue-overview .overview-image {
        margin-bottom: 1.5rem;
    }
    
    .venue-overview .overview-image img {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: cover;
        border-radius: 6px;
    }
    
    /* Fix for text display */
    .venue-overview p,
    .overview-text p {
        display: block;
        width: 100%;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
        white-space: normal !important;
        word-break: normal !important;
        word-spacing: normal !important;
        letter-spacing: normal !important;
    }
    
    .header-container {
        padding: 0.5rem 1rem;
    }
    
    .logo {
        max-width: 110px;
    }
    
    .menu-toggle {
        margin-right: 0;
    }
    
    .main-nav .nav-links {
        width: 85%;
        padding-top: 2rem;
    }
    
    .main-nav .nav-links li {
        margin: 1rem 0;
    }
    
    .main-nav .nav-links a {
        font-size: 1rem;
    }
    
    .main-nav .nav-links a.nav-cta {
        margin: 1rem auto;
        width: 80%;
        padding: 0.6rem 1rem;
        background-color: var(--accent-color);
        color: white;
        border-radius: 4px;
        text-align: center;
    }
}

/* Fix for iPhone X and other notched devices */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    .video-modal .modal-content {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}
