/* Hacienda del Real - Premium Styles */
:root {
    --primary-color: #1a1a1a;
    /* Dark background */
    --secondary-color: #c5a059;
    /* Gold accent */
    --text-color: #f5f5f5;
    --text-muted: #a0a0a0;
    --white: #ffffff;
    --font-main: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-color);
    color: var(--text-color);
    overflow-x: hidden;
}

.text-white-70 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.room-price {
    font-family: var(--font-serif);
    color: var(--secondary-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    color: var(--white);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Navbar */
.navbar {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--secondary-color) !important;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin: 0 10px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color) !important;
}

.dropdown-menu {
    background-color: var(--primary-color);
    border: 1px solid rgba(197, 160, 89, 0.2);
}

.dropdown-item {
    color: var(--text-color);
}

.dropdown-item:hover {
    background-color: rgba(197, 160, 89, 0.1);
    color: var(--secondary-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-item {
    height: 100vh;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomEffect 20s infinite alternate;
}

@keyframes zoomEffect {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeIn 1.5s ease-out;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-family: var(--font-serif);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease;
}

.casa-real-logo {
    max-width: 300px;
    height: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.btn-premium {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    border: 1px solid var(--secondary-color);
}

.btn-premium:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

/* Sections */
.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card-premium {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.card-premium:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
}

.card-premium img {
    height: 250px;
    object-fit: cover;
}

.card-body {
    padding: 2rem;
}

.card-title {
    color: var(--secondary-color);
    font-family: var(--font-serif);
}

/* Footer */
footer {
    background-color: #000;
    padding: 80px 0 30px;
    border-top: 1px solid rgba(197, 160, 89, 0.2);
    color: var(--text-muted);
}

.footer-logo-img {
    max-width: 180px;
    margin-bottom: 20px;
}

.footer-about {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-heading {
    color: var(--white);
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-muted);
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

/* Dark Bar Styles (formerly Breadcrumbs) */
.dark-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 15px 0;
    z-index: 10;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-bar-item {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.dark-bar-item+.dark-bar-item::before {
    color: rgba(255, 255, 255, 0.4);
}

.dark-bar-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.dark-bar-item a:hover {
    color: var(--secondary-color);
}

.dark-bar-item.active {
    color: var(--white);
    font-weight: 600;
}

.footer-contact-item {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.footer-contact-item i {
    color: var(--secondary-color);
    margin-right: 15px;
    font-size: 1.1rem;
    margin-top: 3px;
}

.map-container {
    width: 100%;
    height: 200px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 50px;
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Privacy Policy Sections */
.privacy-section h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-top: 1rem;
}

.privacy-section h5 {
    color: var(--white);
    font-size: 1.1rem;
}

.privacy-section ul,
.privacy-section ol {
    line-height: 1.8;
}

.privacy-section li {
    margin-bottom: 8px;
}

.alert {
    background-color: rgba(197, 160, 89, 0.1);
}

/* Gallery Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(197, 160, 89, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
}

/* Responsive */
/* ================================================
   MOBILE OPTIMIZATION - RESPONSIVE DESIGN
   ================================================ */

/* Tablet & Mobile (iPad and smaller) */
@media (max-width: 992px) {

    /* Hero section adjustments */
    .hero-section {
        height: 50vh !important;
        min-height: 400px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    /* Section padding reduction */
    .section-padding {
        padding: 3rem 0;
    }

    /* Card spacing */
    .card-premium {
        margin-bottom: 1rem;
    }
}

/* Mobile (Phones) */
@media (max-width: 768px) {

    /* Typography mobile */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    h4 {
        font-size: 1.25rem !important;
    }

    h5 {
        font-size: 1.1rem !important;
    }

    p,
    li {
        font-size: 0.95rem;
    }

    /* Hero mobile */
    .hero-section {
        height: 60vh !important;
        min-height: 450px;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Navbar mobile */
    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-brand img {
        height: 30px !important;
    }

    .navbar-nav {
        background: rgba(26, 26, 26, 0.98);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 8px;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        font-size: 1.1rem;
    }

    /* Dropdown mobile */
    .dropdown-menu {
        background: rgba(40, 40, 40, 0.98);
        border: none;
        margin-left: 1rem;
    }

    /* Buttons mobile - bigger touch targets */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        min-height: 44px;
        /* iOS recommended touch target */
    }

    .btn-sm {
        padding: 0.5rem 1rem;
        min-height: 38px;
    }

    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    /* Section padding mobile */
    .section-padding {
        padding: 2.5rem 0;
    }

    /* Section titles mobile */
    .section-title h2 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .section-title p {
        font-size: 0.95rem;
    }

    /* Cards mobile */
    .card {
        margin-bottom: 1.5rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    /* Booking widget mobile */
    .booking-widget {
        padding: 1.5rem !important;
    }

    .booking-widget .row {
        gap: 0.75rem;
    }

    /* Form inputs mobile */
    .form-control,
    .form-select {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
        padding: 0.75rem;
        min-height: 44px;
    }

    /* Gallery mobile */
    .gallery-item {
        margin-bottom: 0.75rem;
    }

    /* Footer mobile */
    footer {
        padding: 2rem 0;
    }

    .footer-logo-img {
        max-width: 180px;
    }

    .footer-about {
        font-size: 0.9rem;
    }

    /* Social links mobile - bigger */
    .social-links a {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    /* Breadcrumb mobile */
    .breadcrumb-container {
        padding: 0.75rem 0;
    }

    .breadcrumb {
        font-size: 0.85rem;
    }

    /* Room cards mobile */
    .room-card .card-body {
        padding: 1rem;
    }

    .room-card h3 {
        font-size: 1.3rem;
    }

    /* Contact cards mobile */
    .card-premium .bi {
        font-size: 2.5rem !important;
    }

    /* Modal mobile */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 12px;
    }

    /* Toast mobile */
    .toast {
        max-width: 90vw;
        font-size: 0.95rem;
    }

    /* Carousel mobile */
    .carousel-caption h2 {
        font-size: 1.75rem;
    }

    .carousel-caption p {
        font-size: 0.95rem;
        display: none;
        /* Hide long text on small screens */
    }

    /* Hide desktop-only elements */
    .d-mobile-none {
        display: none !important;
    }
}

/* Small Mobile (iPhone SE, small Androids) */
@media (max-width: 576px) {

    /* Extra small screens */
    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    /* Booking widget - stack all fields */
    .booking-widget .col-md-3,
    .booking-widget .col-md-2 {
        width: 100% !important;
    }

    /* Buttons full width on tiny screens */
    .btn-block-mobile {
        width: 100%;
        display: block;
    }

    /* Grid adjustments */
    .row.g-4 {
        gap: 1rem !important;
    }

    .row.g-3 {
        gap: 0.75rem !important;
    }

    /* Reduce padding in containers */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Landscape Mobile */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        height: 100vh !important;
        min-height: auto;
    }

    .navbar {
        padding: 0.25rem 0;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Increase all clickable areas */
    a,
    button,
    .btn,
    .nav-link {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Remove hover effects on touch */
    .card:hover,
    .room-card:hover {
        transform: none;
    }

    /* Improve form inputs for touch */
    input,
    textarea,
    select {
        font-size: 16px;
        /* Prevents zoom */
    }
}

/* High DPI screens (Retina, etc) */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Use higher quality images if available */
    .hero-section {
        background-size: cover;
        image-rendering: -webkit-optimize-contrast;
    }
}
/* Navbar Mobile Inline Fix */
@media (max-width: 992px) {
    .navbar .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .navbar-brand {
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .navbar-toggler {
        margin-left: auto;
    }
}

/* Hero Images Mobile Optimization - Show full image */
@media (max-width: 768px) {
    /* Adjust hero sections to show more of the image */
    .hero-section {
        background-position: center center !important;
        background-size: cover !important;
    }
    
    /* For pages with inline style background images */
    header.hero-section[style*="background-image"] {
        background-position: center 30% !important;
    }
    
    /* Adjust hero content to not overlap important parts */
    .hero-content {
        position: relative;
        z-index: 2;
        padding-top: 80px; /* Account for navbar */
    }
}

/* Small mobile - adjust further */
@media (max-width: 576px) {
    .hero-section {
        background-position: center 25% !important;
    }
    
    /* Reduce gradient overlay to see image better */
    header.hero-section[style*="linear-gradient"]::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.3);
        z-index: 1;
    }
}

/* Alternative: Object-fit approach for better mobile hero images */
@media (max-width: 768px) {
    /* Ensure hero images don't zoom too much */
    .hero-section {
        min-height: 450px;
        max-height: 60vh;
    }
    
    /* Center the visible portion */
    header[style*="background-image"] {
        background-attachment: scroll !important;
        -webkit-background-size: cover !important;
        -moz-background-size: cover !important;
        -o-background-size: cover !important;
    }
}

/* Portrait orientation - show more vertical space */
@media (max-width: 768px) and (orientation: portrait) {
    .hero-section {
        background-position: center 40% !important;
    }
}

/* Landscape - different positioning */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        background-position: center center !important;
        height: 100vh !important;
    }
}

/* Fix for 3-column grids in mobile - keep them inline */
@media (max-width: 768px) {
    /* Force 3 items to stay in one row on mobile */
    .row.g-3 > .col-4,
    .row.g-3 > [class*="col-4"] {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
    
    /* Reduce padding inside cards with 3 columns */
    .col-4 .p-3 {
        padding: 0.75rem !important;
    }
    
    /* Smaller icons and text in 3-column layout */
    .col-4 .fs-2 {
        font-size: 1.5rem !important;
    }
    
    .col-4 h6 {
        font-size: 0.8rem !important;
    }
    
    /* Images in 2-1 grid - make them stack better */
    .row.g-3 > .col-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .row.g-3 > .col-12 {
        margin-top: 0.75rem;
    }
}

/* Extra small - stack vertically if too cramped */
@media (max-width: 380px) {
    /* On very small screens, stack cards vertically */
    .row.g-3 > .col-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 0.5rem;
    }
}

/* ================================================
   COMPREHENSIVE GRID FIXES FOR ALL PAGES - MOBILE
   ================================================ */

/* Fix for 3-column grids (Servicios page - 3 cards) */
@media (max-width: 768px) {
    /* Servicios: 3 cards in mobile - make them vertical for better readability */
    .col-md-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem;
    }
}

/* Fix for 4-column grids (Contacto, Casa Real Especialidades - 4 cards) */
@media (max-width: 992px) {
    /* col-md-6 col-lg-3 = 4 items, show 2x2 on tablet */
    .col-md-6.col-lg-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (max-width: 576px) {
    /* On small mobile, stack 4-column grids vertically */
    .col-md-6.col-lg-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem;
    }
}

/* Fix for rooms section (4 rooms cards) */
@media (max-width: 992px) {
    /* Keep 2 columns on tablet */
    .col-md-6.col-lg-3.room-card {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (max-width: 576px) {
    /* Stack on small mobile */
    .col-md-6.col-lg-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Habitaciones detail pages - feature icons (4 items) */
@media (max-width: 768px) {
    /* Keep 2x2 grid on mobile for features */
    .col-6.col-md-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 1rem;
    }
    
    /* Reduce icon sizes for smaller cards */
    .col-6.col-md-3 .fs-2 {
        font-size: 1.75rem !important;
    }
    
    .col-6.col-md-3 h5 {
        font-size: 1rem !important;
    }
}

/* Gallery grid - keep 2 columns always on mobile */
@media (max-width: 768px) {
    .col-6.col-md-4.col-lg-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* Home page booking widget - 4 fields */
@media (max-width: 768px) {
    .booking-widget .col-md-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 576px) {
    .booking-widget .col-md-3,
    .booking-widget .col-md-2 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Ensure proper spacing in all grids */
@media (max-width: 768px) {
    .row.g-4 > [class*="col-"] {
        padding-bottom: 1rem;
    }
    
    .row.g-3 > [class*="col-"] {
        padding-bottom: 0.75rem;
    }
}
