/* ==========================================
   ADDITIONAL MOBILE OPTIMIZATION STYLES
   Enhanced Typography & Spacing
   ========================================== */

:root {
    /* Base spacing unit */
    --spacing-unit: 8px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Typography scale */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 28px;
    --font-size-4xl: 32px;

    /* Line heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Touch targets */
    --touch-target: 44px;
    --touch-target-padding: 12px 16px;

    /* Colors */
    --primary-color: #1F1F1F;
    --text-color: #4D4D4D;
    --border-color: #e0e0e0;

    /* Transitions */
    --transition-base: 0.3s ease;
}

/* ==========================================
   RESPONSIVE TYPOGRAPHY
   ========================================== */

/* Extra Small Devices */
@media (max-width: 480px) {
    :root {
        --font-size-xs: 11px;
        --font-size-sm: 13px;
        --font-size-base: 14px;
        --font-size-lg: 16px;
        --font-size-xl: 18px;
        --font-size-2xl: 20px;
        --font-size-3xl: 22px;
    }

    body {
        font-size: var(--font-size-base);
        line-height: var(--line-height-normal);
    }

    h1 {
        font-size: var(--font-size-3xl) !important;
        line-height: var(--line-height-tight);
        margin: var(--spacing-md) 0;
    }

    h2 {
        font-size: var(--font-size-2xl) !important;
        margin: var(--spacing-md) 0;
    }

    h3 {
        font-size: var(--font-size-xl) !important;
        margin: var(--spacing-sm) 0;
    }

    p {
        font-size: var(--font-size-sm);
        line-height: var(--line-height-relaxed);
        margin: var(--spacing-sm) 0;
    }
}

/* Small Devices */
@media (min-width: 481px) and (max-width: 768px) {
    :root {
        --font-size-xs: 12px;
        --font-size-sm: 14px;
        --font-size-base: 15px;
        --font-size-lg: 17px;
        --font-size-xl: 19px;
        --font-size-2xl: 22px;
        --font-size-3xl: 25px;
    }

    body {
        font-size: var(--font-size-base);
        line-height: var(--line-height-normal);
    }

    h1 {
        font-size: var(--font-size-3xl) !important;
    }

    h2 {
        font-size: var(--font-size-2xl) !important;
    }

    h3 {
        font-size: var(--font-size-xl) !important;
    }
}

/* Medium Devices & Up */
@media (min-width: 769px) {
    :root {
        --font-size-xs: 12px;
        --font-size-sm: 14px;
        --font-size-base: 16px;
        --font-size-lg: 18px;
        --font-size-xl: 20px;
        --font-size-2xl: 24px;
        --font-size-3xl: 28px;
        --font-size-4xl: 32px;
    }

    h1 {
        font-size: var(--font-size-4xl) !important;
    }

    h2 {
        font-size: var(--font-size-3xl) !important;
    }

    h3 {
        font-size: var(--font-size-2xl) !important;
    }
}

/* ==========================================
   TOUCH-FRIENDLY INTERACTIONS
   ========================================== */

/* All clickable elements should have minimum touch size */
a,
button,
input[type="button"],
input[type="submit"],
.btn,
.button,
.line-button,
.boxed-btn3,
.book_now {
    min-height: var(--touch-target);
    min-width: var(--touch-target);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--touch-target-padding);
    font-size: var(--font-size-base);
    transition: var(--transition-base);
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
}

/* Active/Focus states for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Remove outline on mouse click (visible on keyboard) */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================
   FORM OPTIMIZATION
   ========================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
    /* Touch-friendly size */
    min-height: var(--touch-target);
    padding: 12px 16px;
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    transition: var(--transition-base);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(31, 31, 31, 0.1);
}

@media (max-width: 768px) {
    input,
    select,
    textarea {
        width: 100% !important;
        max-width: 100%;
        margin: var(--spacing-sm) 0;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ==========================================
   IMAGE OPTIMIZATION
   ========================================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Responsive images with picture element */
picture {
    display: block;
    max-width: 100%;
}

picture img {
    width: 100%;
    height: auto;
}

/* Background images optimization */
.slider_bg_1,
.slider_bg_2,
.video_bg {
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
}

@media (prefers-reduced-motion: reduce) {
    .slider_bg_1,
    .slider_bg_2,
    .video_bg {
        background-attachment: scroll !important;
    }
}

/* ==========================================
   SPACING & LAYOUT UTILITIES
   ========================================== */

@media (max-width: 480px) {
    /* Reduce spacing on small screens */
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    section {
        padding: var(--spacing-lg) 0 !important;
    }

    .row {
        margin-right: -6px !important;
        margin-left: -6px !important;
    }

    [class*="col-"] {
        padding-right: 6px !important;
        padding-left: 6px !important;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    section {
        padding: var(--spacing-xl) 0 !important;
    }
}

@media (min-width: 769px) {
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    section {
        padding: var(--spacing-2xl) 0 !important;
    }
}

/* ==========================================
   FLEXBOX & GRID UTILITIES
   ========================================== */

.flex-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

@media (max-width: 768px) {
    .flex-responsive {
        flex-direction: column;
    }

    .flex-responsive > * {
        flex: 0 0 100%;
    }
}

.grid-auto {
    display: grid;
    gap: var(--spacing-lg);
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

@media (max-width: 480px) {
    .grid-auto {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* ==========================================
   MOBILE HEADER OPTIMIZATION
   ========================================== */

@media (max-width: 992px) {
    .header-area {
        padding: 12px 0 !important;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .logo-img {
        text-align: center;
    }

    .logo-img img {
        height: auto;
        max-height: 50px;
    }

    .main-menu {
        display: none !important;
    }

    .mobile_menu {
        display: block !important;
    }

    /* Book Room Section on Mobile */
    .book_room {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 15px 10px !important;
        gap: 12px;
    }

    .book_room .socail_links {
        width: 100%;
        text-align: center;
        order: 2;
    }

    .book_room .socail_links ul {
        display: flex !important;
        justify-content: center;
        gap: 15px;
        flex-wrap: wrap;
    }

    .book_room .socail_links ul li {
        display: inline-block;
    }

    .book_room .socail_links ul li a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(104, 16, 22, 0.1);
        font-size: 16px;
        transition: all 0.3s ease;
    }

    .book_room .socail_links ul li a:hover {
        background: rgba(104, 16, 22, 0.2);
        color: #681016;
    }

    /* Book Button - Mobile Priority */
    .book_room .book_btn {
        margin-left: 0 !important;
        width: 100% !important;
        order: 1;
    }

    .book_room .book_btn a {
        display: block;
        width: 100% !important;
        padding: 14px 20px !important;
        background: #681016 !important;
        color: white !important;
        font-size: 15px !important;
        font-weight: 600;
        border: none !important;
        border-radius: 6px;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.3s ease;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .book_room .book_btn a:hover {
        background: #fff !important;
        color: #681016 !important;
        border: 2px solid #681016 !important;
        box-shadow: 0 4px 12px rgba(104, 16, 22, 0.3);
    }

    .book_room .book_btn a:active {
        transform: scale(0.98);
    }
}

/* ==========================================
   VIEWPORT-BASED UTILITIES
   ========================================== */

/* Full viewport height sections */
.full-viewport {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Prevent horizontal overflow */
body,
html {
    width: 100%;
    overflow-x: hidden;
}

/* ==========================================
   LAZY LOADING SUPPORT
   ========================================== */

img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

img[loading="lazy"].loaded {
    animation: none;
    background: none;
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    @page {
        margin: 2cm;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    a {
        color: black;
        text-decoration: none;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    h1, h2, h3, h4 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    img {
        page-break-inside: avoid;
        max-width: 100%;
    }
}

/* ==========================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================== */

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible for better keyboard navigation */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    body {
        font-weight: 500;
    }

    a {
        text-decoration: underline;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e0e0e0;
        --border-color: #444;
    }

    body {
        background-color: #1a1a1a;
        color: var(--text-color);
    }

    input,
    select,
    textarea {
        background-color: #2a2a2a;
        color: var(--text-color);
        border-color: var(--border-color);
    }
}

/* ==========================================
   UTILITY CLASSES FOR RESPONSIVE DESIGN
   ========================================== */

.visible-mobile {
    display: none !important;
}

.hidden-mobile {
    display: block !important;
}

@media (max-width: 768px) {
    .visible-mobile {
        display: block !important;
    }

    .hidden-mobile {
        display: none !important;
    }

    .visible-tablet {
        display: none !important;
    }

    .text-center-mobile {
        text-align: center !important;
    }

    .margin-auto-mobile {
        margin: 0 auto !important;
    }
}

/* ==========================================
   LOADING & EMPTY STATES
   ========================================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-color);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}
