/* 
   ROYAL IVORY OPTIMIZED PAGES CSS - WITH MOBILE NAVIGATION
   Enhanced mobile dropdowns + mobile navigation + header alignment fix  
   Upload to: css/optimized-pages.css
*/

/* Header Alignment Fix */
/* Fix Superfish dropdown visibility - Add at very top */

#lang {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: right;
}

#lang li {
    display: inline-block;
    margin: 0 2px;
}

/* Ensure mobile menus are on same level */
@media (max-width: 768px) {
    header #lang {
        position: absolute;
        top: 0;
        right: 0;
        margin-top: 10px;
    }
    
    header #logo {
        margin-top: 10px;
    }
}

/* Enhanced Mobile Menu Dropdowns - Royal Ivory Style */
select.mobileMenu {
    color: #444;
    background: #fff;
    background: linear-gradient(to bottom, #ffffff 0%, #f6f6f6 47%, #ededed 100%);
    border: 1px solid #ccc;
    border-radius: 4px;
    font: 14px 'PT Sans Narrow', Arial, sans-serif;
    font-weight: 400;
    padding: 8px 12px;
    margin: auto;
    margin-top: -17px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

select.mobileMenu:hover,
select.mobileMenu.hover {
    background: linear-gradient(to bottom, #ffffff 0%, #f9f9f9 47%, #f0f0f0 100%);
    border-color: #999;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

select.mobileMenu:focus,
select.mobileMenu.focused {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.3), 0 3px 6px rgba(0,0,0,0.15);
    background: linear-gradient(to bottom, #ffffff 0%, #fefefe 47%, #f8f8f8 100%);
}

/* Enhanced Mobile Menu States */
select.mobileMenu.enhanced {
    background-image: linear-gradient(45deg, transparent 0%, transparent 35%, rgba(139, 69, 19, 0.05) 35%, rgba(139, 69, 19, 0.05) 65%, transparent 65%);
    background-size: 20px 20px;
}

select.mobileMenu.loading {
    background: linear-gradient(to bottom, #f0f0f0 0%, #e8e8e8 47%, #ddd 100%);
    cursor: wait;
    opacity: 0.8;
}

select.mobileMenu.loading::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #8B4513;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Language Dropdown Specific Styling */
select.langMenu {
    margin-top: -45px !important;
    margin-right: 10px;
    float: right;
    width: 140px;
    font-size: 12px;
    padding: 6px 10px;
    color: #7d7d7d;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(125,125,125,0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

select.langMenu:hover,
select.langMenu.hover {
    color: #333;
    background: rgba(255,255,255,0.95);
    border-color: rgba(125,125,125,0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

select.langMenu:focus,
select.langMenu.focused {
    border-color: rgba(139, 69, 19, 0.6);
    box-shadow: 0 0 5px rgba(139, 69, 19, 0.4);
    background: rgba(255,255,255,0.98);
}

select.langMenu option {
    color: #444;
    background: #fff;
    padding: 8px;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

select.langMenu option:hover {
    background: #f8f8f8;
    color: #8B4513;
}

/* Loading State for Dropdowns */
.dropdown-loading {
    position: absolute;
    right: 10px;
    top: 20px;
    color: #7d7d7d;
    font-size: 11px;
    font-style: italic;
    animation: fadeInOut 1s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Responsive Mobile Menu Positioning */
@media only screen and (max-width: 959px) {
    select.mobileMenu {
        width: 180px;
        margin-right: 70px;
        margin-top: -57px;
        font-size: 13px;
    }
    
    select.langMenu {
        width: 120px;
        margin-top: -50px;
        margin-right: 15px;
    }
}

@media only screen and (min-width: 768px) and (max-width: 959px) {
    select.mobileMenu {
        width: 160px;
        margin-right: 60px;
    }
    
    select.langMenu {
        width: 110px;
        margin-right: 20px;
    }
}

@media only screen and (max-width: 784px) {
     /* Target the auto-generated mobile menu selects */
    select.mobileMenu {
        position: fixed !important;
        top: 8.5em !important;
        background: white !important;
        padding: 6px 10px !important;
        font-size: 14px !important;
    }
    
    /* Style both navigation dropdowns */
    #main-nav + select.mobileMenu {
        position: fixed !important;
        top: 9em !important;
        z-index: 999999 !important;
		left: 4em !important;
		font-size: 16px !important;
    }
    
    /* Position language menu slightly lower */
    #lang + select.mobileMenu {
		position: fixed !important;
        top: 10.5em !important;
		right: 0px !important; 	
		width: 100px !important; 	
    }
}

@media only screen and (min-width: 557px) and (max-width: 783px) {

    /* Target the auto-generated mobile menu selects */
    select.mobileMenu {
        position: fixed !important;
        top: 9em !important;
        background: white !important;
        padding: 6px 10px !important;
        font-size: 14px !important;
    }
    
    /* Style both navigation dropdowns */
    #main-nav + select.mobileMenu {
        position: fixed !important;
        top: 9em !important;
        z-index: 999999 !important;
		left: 10em !important;
		font-size: 16px !important;
    }
    
    /* Position language menu slightly lower */
    #lang + select.mobileMenu {
		position: fixed !important;
        top: 10.3em !important;
		right: 30px !important; 		
		width: 100px !important; 	

    }

}
@media only screen and (max-width: 556px) {
    select.mobileMenu {
        position: fixed !important;
        top: 8.8em !important;
        background: white !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
    
    /* Style both navigation dropdowns */
    #main-nav + select.mobileMenu {
        position: fixed !important;
        top: 8.8em !important;
        z-index: 999999 !important;
		left: 3.2em !important;
		font-size: 14x !important;
		width: 150px !important; 
    }
    
    /* Position language menu slightly lower */
    #lang + select.mobileMenu {
		position: fixed !important;
        top: 12em !important;
		right: -20px !important; 	
		width: 80px !important; 	
		

    }

}

/* Enhanced Tables */
.facilities-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.facilities-table thead tr {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
}

.facilities-table th {
    padding: 15px 12px;
    text-align: left;
    border: none;
    font-weight: 600;
}

.facilities-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.facilities-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.facilities-table .cost-free {
    color: #27ae60;
    font-weight: 600;
}

.facilities-table .cost-paid {
    color: #f39c12;
    font-weight: 600;
}

/* FAQ Styling */
.faq-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #27ae60;
}

.faq-item:nth-child(even) {
    background: #fff;
    border: 1px solid #e9ecef;
    border-left: 4px solid #27ae60;
}

.faq-item h3 {
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 18px;
}

.faq-item p {
    margin-bottom: 0;
    line-height: 1.6;
}

/* Callout Boxes */
.pro-tip {
    background: #f9f9f9;
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #27ae60;
    border-radius: 0 4px 4px 0;
}

.guest-advantage {
    background: #e8f5e8;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.guest-advantage h4 {
    color: #27ae60;
    margin-bottom: 10px;
}

.guest-testimonial {
    margin-top: 15px;
    font-style: italic;
    border-top: 1px solid #27ae60;
    padding-top: 10px;
}

/* Enhanced Lists */
.list_4_enhanced {
    list-style: none;
    padding-left: 0;
}

.list_4_enhanced li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.list_4_enhanced li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* Related Content Grid */
.related-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.related-item {
    background: white;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.related-item h4 {
    margin: 0 0 10px 0;
    color: #007bff;
}

.related-item h4 a {
    text-decoration: none;
    color: #007bff;
}

.related-item p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* Social Sharing */
.social-sharing {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: center;
}

.social-sharing h4 {
    margin-bottom: 10px;
}

.social-btn {
    display: inline-block;
    padding: 8px 15px;
    margin: 5px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 12px;
    color: white;
}

.social-btn.facebook {
    background: #3b5998;
}

.social-btn.twitter {
    background: #1da1f2;
}

/* Loading Animation for Dropdowns */
select.mobileMenu.loading {
    background-image: url('data:image/gif;base64,R0lGODlhEAAQAPIAAP///wAAAMLCwkJCQgAAAGJiYoKCgpKSkiH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklrE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAAEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUkKhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYumCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzIIunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAAACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wjRLRnlMl3uFfhAYOmHEJRb3xjEMBwfJXmf+xkgJB+RGKR3j45hyWHE5KWEUJADs=');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
}

/* Royal Ivory Branding & Style Guide Integration */

/* Enhanced Options Styling - Royal Ivory Theme */
select.mobileMenu option {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    color: #444;
    font-size: 13px;
    font-family: 'PT Sans Narrow', Arial, sans-serif;
}

select.mobileMenu option:hover,
select.mobileMenu option:focus {
    background: linear-gradient(to right, rgba(139, 69, 19, 0.05), rgba(139, 69, 19, 0.1));
    color: #8B4513;
    font-weight: 500;
}

select.mobileMenu option[value=""] {
    font-weight: 600;
    color: #8B4513;
    background: linear-gradient(to right, rgba(139, 69, 19, 0.1), rgba(139, 69, 19, 0.05));
    border-bottom: 2px solid rgba(139, 69, 19, 0.2);
}

/* Language Menu Specific Options */
select.langMenu option {
    padding: 8px 12px;
    font-size: 12px;
    color: #7d7d7d;
    background: #fff;
    border-bottom: 1px solid #f8f8f8;
}

select.langMenu option:hover,
select.langMenu option:focus {
    background: rgba(139, 69, 19, 0.08);
    color: #8B4513;
}

/* Royal Ivory Color Scheme Integration */
select.mobileMenu.enhanced:focus,
select.langMenu:focus {
    border-color: #8B4513 !important;
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.4), 0 0 0 2px rgba(139, 69, 19, 0.1) !important;
}

/* Mobile Menu Integration with Royal Ivory Header */
@media only screen and (max-width: 767px) {
    select.mobileMenu,
    select.langMenu {
        border: 1px solid rgba(139, 69, 19, 0.3);
        box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
        font-family: 'PT Sans Narrow', Arial, sans-serif;
    }
    
    /* Sync with Royal Ivory header background gradient */
    select.mobileMenu:focus,
    select.langMenu:focus {
        background: rgba(255,255,255,0.98);
        border-color: #8B4513;
        outline: none;
    }
    
    /* Add subtle Royal Ivory texture */
    select.mobileMenu {
        background-image: linear-gradient(45deg, transparent 0%, transparent 35%, rgba(139, 69, 19, 0.02) 35%, rgba(139, 69, 19, 0.02) 65%, transparent 65%);
        background-size: 15px 15px;
    }
}

/* Enhanced Responsive Positioning - Royal Ivory Layout */
@media only screen and (max-width: 479px) {
    select.mobileMenu {
        background: linear-gradient(to bottom, 
            rgba(255,255,255,0.95) 0%, 
            rgba(246,246,246,0.95) 47%, 
            rgba(237,237,237,0.95) 100%);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
    
    select.langMenu {
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }


}



/* Royal Ivory Accent Colors for Active States */
select.mobileMenu:active,
select.langMenu:active {
    background: linear-gradient(to bottom, #f8f8f8 0%, #eeeeee 47%, #e0e0e0 100%);
    border-color: #8B4513;
    transform: translateY(1px);
}

/* Custom Dropdown Arrow - Royal Ivory Style */
select.mobileMenu:not(.loading),
select.langMenu:not(.loading) {
    background-image: linear-gradient(45deg, transparent 40%, #8B4513 40%, #8B4513 60%, transparent 60%);
    background-position: right 15px center;
    background-size: 8px 8px;
    background-repeat: no-repeat;
}

/* Desktop - hide mobile elements */
@media (min-width: 769px) {
    select.mobileMenu,
    select.langMenu {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    select.mobileMenu,
    select.langMenu,
    .faq-item,
    .related-content {
        break-inside: avoid;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    select.mobileMenu {
        background: linear-gradient(to bottom, #2c3e50 0%, #34495e 47%, #2c3e50 100%);
        color: #ecf0f1;
        border-color: #34495e;
    }
    
    select.langMenu {
        background: rgba(44, 62, 80, 0.9);
        color: #ecf0f1;
        border-color: rgba(52, 73, 94, 0.5);
    }
    
    .faq-item,
    .toc-navigation {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: #34495e;
    }
    
    .related-item {
        background: #34495e;
        color: #ecf0f1;
        border-color: #2c3e50;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Hide original table structure on mobile */
    .facilities-table,
    .facilities-table thead,
    .facilities-table tbody,
    .facilities-table th,
    .facilities-table td,
    .facilities-table tr {
        display: block !important;
    }
    
    /* Hide table headers on mobile */
    .facilities-table thead tr {
        display: none !important;
    }
    
    /* Style each row as a card */
    .facilities-table tbody tr {
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        position: relative;
    }
    
    .facilities-table tbody tr:nth-child(even) {
        background: #fff;
    }
    
    /* Force each cell on separate lines with spacing */
    .facilities-table td {
        display: block !important;
        width: 100% !important;
        border: none !important;
        padding: 8px 0 !important;
        text-align: left !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin: 0 !important;
        clear: both !important;
    }
    
    /* Add labels before each cell */
    .facilities-table td:nth-child(1):before { content: ""; }
    .facilities-table td:nth-child(2):before { content: "Details: "; font-weight: 600; color: #666; }
    .facilities-table td:nth-child(3):before { content: "Best Times: "; font-weight: 600; color: #666; }
    .facilities-table td:nth-child(4):before { content: "Cost: "; font-weight: 600; color: #666; }
    
    /* Make first cell (facility name) bigger and separated */
    .facilities-table td:nth-child(1) {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #27ae60 !important;
        margin-bottom: 12px !important;
        border-bottom: 1px solid #dee2e6 !important;
        padding-bottom: 8px !important;
    }
    
    /* Add spacing between info lines */
    .facilities-table td:nth-child(2) {
        margin-bottom: 5px !important;
    }
    
    .facilities-table td:nth-child(3) {
        margin-bottom: 5px !important;
    }
    
    .facilities-table td:nth-child(4) {
        font-weight: 600 !important;
    }
}  
    /* Show mobile navigation toggle - Important to override any conflicts */
    .mobile-nav-toggle {
        display: block !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 999 !important;
    }
    
    .mobile-bottom-nav {
        display: none !important; /* Hidden by default, shown when .active class is added */
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 3px solid #27ae60;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

/* Show mobile bottom nav on mobile screens */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: block !important;
    }
}

.mobile-bottom-nav.active {
    transform: translateY(0);
}

.mobile-nav-container {
    padding: 20px 15px;
    position: relative;
}

.mobile-nav-container h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    text-align: center;
}

.mobile-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-grid li {
    margin: 0;
}

.mobile-nav-grid a {
    display: block;
    padding: 12px 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-grid a:hover,
.mobile-nav-grid a:active {
    background: #27ae60;
    color: white;
    border-color: #27ae60;
    transform: scale(0.98);
}

.mobile-nav-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.mobile-nav-close:hover {
    color: #495057;
}

/* Mobile Navigation Toggle Button */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.nav-toggle-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 140px;
}

.nav-toggle-btn:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}

.nav-toggle-btn:active {
    transform: translateY(0);
}

/* Mobile-specific button styling */
@media (max-width: 768px) {
    .nav-toggle-btn {
        font-size: 13px !important;
        padding: 10px 15px !important;
        border-radius: 20px !important;
        box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4) !important;
    }
}


@media (max-width: 769px) {
    .facilities-table td:nth-child(2):before,
    .facilities-table td:nth-child(3):before, 
    .facilities-table td:nth-child(4):before {
        display: none !important;
    }
}