
/* theme.css and mobile.css are loaded directly as <link> tags in HTML head to avoid @import chain depth */

/* Global sizing reset because Tailwind preflight is disabled */
*,
*::before,
*::after {
    box-sizing: border-box;
}


/* Hero Section Image Fix */
.hero-image-container {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgb(232, 229, 220);
    position: relative;
}

.hero-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(0.95);
}

/* Hero spacing is controlled here because some mt-* utilities are absent in compiled tailwind.css */
.hero-image-frame {
    margin-top: 3.5rem;
}

@media (min-width: 640px) {
    .hero-image-frame {
        margin-top: 2rem;
    }
}

@media (min-width: 1024px) {
    .hero-image-frame {
        margin-top: 4rem;
    }
}

/* Gallery Grid Enhanced */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 0.75rem;
    background-color: rgb(240, 237, 232);
    cursor: pointer;
    position: relative;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

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

/* i18n Classes */
[data-i18n] {
    transition: opacity 0.2s ease;
}

/* Language Switcher */
.lang-select {
    min-width: 4.5rem;
    padding: 0.5rem 2rem 0.5rem 0.85rem;
    border: 1px solid rgb(231, 229, 228);
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.92);
    color: rgb(68, 64, 60);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgb(120, 113, 108) 50%), linear-gradient(135deg, rgb(120, 113, 108) 50%, transparent 50%);
    background-position: calc(100% - 1rem) calc(50% - 0.1rem), calc(100% - 0.75rem) calc(50% - 0.1rem);
    background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
    background-repeat: no-repeat;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.lang-select:hover {
    border-color: rgb(168, 162, 158);
    color: rgb(28, 25, 23);
}

.lang-select:focus {
    outline: none;
    border-color: rgb(28, 25, 23);
    box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.08);
}

.lang-select-mobile {
    width: 100%;
    max-width: 8rem;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgb(231, 229, 228);
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.92);
    color: rgb(68, 64, 60);
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    border-color: rgb(168, 162, 158);
    color: rgb(28, 25, 23);
    transform: translateY(-1px);
}

.theme-toggle:focus {
    outline: none;
    border-color: rgb(28, 25, 23);
    box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.08);
}

.theme-toggle iconify-icon {
    font-size: 1rem;
}

.theme-toggle-mobile {
    width: 100%;
    max-width: 8rem;
}

/* Smooth Scrolling (already in html) */
html {
    scroll-behavior: smooth;
}

/* Sunna Cards Carousel */
.sunna-slider {
    scrollbar-width: thin;
    scrollbar-color: rgb(161, 140, 119) transparent;
}

.sunna-slider::-webkit-scrollbar {
    height: 8px;
}

.sunna-slider::-webkit-scrollbar-track {
    background: rgb(245, 245, 244);
    border-radius: 10px;
}

.sunna-slider::-webkit-scrollbar-thumb {
    background-color: rgb(161, 140, 119);
    border-radius: 10px;
    border: 2px solid rgb(245, 245, 244);
}

.sunna-slider::-webkit-scrollbar-thumb:hover {
    background-color: rgb(120, 113, 108);
}

/* Custom Scrollbar Global */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgb(161, 140, 119) rgb(245, 245, 244);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgb(245, 245, 244);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgb(161, 140, 119);
    border-radius: 10px;
    border: 2px solid rgb(245, 245, 244);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgb(120, 113, 108);
}

.sunna-card {
    scroll-snap-align: start;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.sunna-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Apply animations to elements */
[data-gallery-item] {
    animation: scaleIn 0.5s ease-out forwards;
}

[data-gallery-item]:nth-child(1) { animation-delay: 0.1s; }
[data-gallery-item]:nth-child(2) { animation-delay: 0.15s; }
[data-gallery-item]:nth-child(3) { animation-delay: 0.2s; }
[data-gallery-item]:nth-child(4) { animation-delay: 0.25s; }
[data-gallery-item]:nth-child(5) { animation-delay: 0.3s; }
[data-gallery-item]:nth-child(6) { animation-delay: 0.35s; }
[data-gallery-item]:nth-child(7) { animation-delay: 0.4s; }
[data-gallery-item]:nth-child(8) { animation-delay: 0.45s; }

.sunna-card {
    animation: slideInUp 0.6s ease-out forwards;
}

.sunna-card:nth-child(1) { animation-delay: 0.1s; }
.sunna-card:nth-child(2) { animation-delay: 0.15s; }
.sunna-card:nth-child(3) { animation-delay: 0.2s; }
.sunna-card:nth-child(4) { animation-delay: 0.25s; }
.sunna-card:nth-child(5) { animation-delay: 0.3s; }
.sunna-card:nth-child(6) { animation-delay: 0.35s; }
.sunna-card:nth-child(7) { animation-delay: 0.4s; }

/* Button and Link Animations */
button, a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Apartment cards CTA buttons: keep all 5 cards visually consistent */
.apartment-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.apartment-cta {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 2rem;
    text-decoration: none;
    border: 0;
}

.apartment-cta-disabled {
    border: 0;
    outline: 0;
    box-shadow: none;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

/* Location metric cards: keep consistent spacing and prevent text overflow look */
.location-metric-card {
    padding: 1rem 1.1rem;
    min-height: 6.25rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.35rem;
}

.location-metric-title {
    margin: 0;
    line-height: 1.25;
}

.location-metric-text {
    margin: 0;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

@media (min-width: 640px) {
    .location-metric-card {
        padding: 1.1rem 1.2rem;
        min-height: 6.6rem;
    }
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .sunna-slider {
        -webkit-overflow-scrolling: touch;
    }
}

