/* Custom CSS for Countryside Retreat Hotel */

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

.animation-delay-600 {
    animation-delay: 0.6s;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse 4s ease-in-out infinite;
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

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

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    width: 100%;
    padding: 0 2rem;
}

.hero-text {
    margin-bottom: 0;
}

.hero-title {
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.title-main {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
}

.title-highlight {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: #d4af37;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ===== BOOKING FORM ===== */
.booking-form-container {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 900px;
    width: calc(100% - 4rem);
}

.booking-form {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 180px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #b48843;
    box-shadow: 0 0 0 3px rgba(180, 136, 67, 0.15);
}

.btn-search {
    background: linear-gradient(135deg, #b48843, #9d7037);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    min-width: 140px;
    height: 50px;
    position: relative;
    overflow: hidden;
}

.btn-search:hover {
    background: linear-gradient(135deg, #82582f, #b48843);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(180, 136, 67, 0.4);
}

.btn-search:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(180, 136, 67, 0.3);
}

.btn-search:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(180, 136, 67, 0.3);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero {
        min-height: 600px;
    }
    
    .hero-content {
        top: 40%;
    }
    
    .booking-form-container {
        bottom: 80px;
        padding: 20px;
        width: calc(100% - 2rem);
        border-radius: 8px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px;
        border-radius: 30px;
    }
    
    .btn-search {
        border-radius: 30px;
        width: 100%;
        margin-top: 8px;
        min-width: 100%;
    }
    
    .title-main,
    .title-highlight {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    
    .hero-subtitle {
        font-size: clamp(0.9rem, 1.8vw, 1.2rem);
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 600px;
    }
    
    .hero-content {
        padding: 0 1rem;
        top: 35%;
    }
    
    .booking-form-container {
        bottom: 60px;
        padding: 16px;
        width: calc(100% - 1.5rem);
        border-radius: 8px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px;
        font-size: 14px;
        border-radius: 22px;
    }
    
    .btn-search {
        padding: 12px 20px;
        font-size: 14px;
        height: 46px;
        border-radius: 22px;
    }
    
    .title-main,
    .title-highlight {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(0.8rem, 1.4vw, 0.95rem);
        margin-bottom: 1rem;
    }
}

/* Navbar Styles */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #b48843;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9d7037;
}

/* Gallery Item Hover Effects */
.gallery-item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

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

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

/* Always visible text with better readability */
.gallery-item .absolute.inset-0 {
    pointer-events: none;
}

.gallery-item .text-white {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Button Hover Effects */
.btn-countryside {
    background: linear-gradient(135deg, #b48843, #9d7037);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-countryside::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.5s ease;
}

.btn-countryside:hover::before {
    left: 100%;
}

/* Section Dividers */
.section-divider {
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #b48843, transparent);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Typography Enhancements */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Form Input Focus Effects */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input:focus {
    border-color: #b48843;
    box-shadow: 0 0 0 3px rgba(180, 136, 67, 0.1);
    outline: none;
}

/* Parallax Effect for Hero Section */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(180, 136, 67, 0.3);
    border-radius: 50%;
    border-top-color: #b48843;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message Styles */
.success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInUp 0.5s ease-out forwards;
}

.error-message {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }
    
    .animate-fade-in-up {
        animation-duration: 0.8s;
    }
    
    .gallery-item::after {
        font-size: 0.9rem;
    }
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .hero-bg {
        background-image: none;
        background-color: #333;
    }
    
    .text-countryside-600 {
        color: #000 !important;
    }
    
    .bg-countryside-600 {
        background-color: #000 !important;
    }
}

/* Print Styles */
@media print {
    .no-print,
    nav,
    footer,
    #book,
    .animate-bounce {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    .text-white {
        color: #000 !important;
    }
    
    .bg-countryside-600,
    .bg-countryside-800 {
        background: #fff !important;
        color: #000 !important;
    }
}

/* Focus Styles for Accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #b48843;
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #b48843;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Image Lazy Loading */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Custom Select Dropdown Arrow */
.custom-select {
    position: relative;
}

.custom-select::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #b48843;
}

/* Testimonial Card Styles */
.testimonial-card {
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, #fafaf9, #f5f5f4);
    border-left: 4px solid #b48843;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 3rem;
    color: rgba(180, 136, 67, 0.3);
    font-family: serif;
}

/* Room Card Hover Animation */
.room-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.room-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Icon Pulse Animation */
.icon-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #b48843, #9d7037);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Floating Elements */
.float-1 {
    animation: float 6s ease-in-out infinite;
}

.float-2 {
    animation: float 6s ease-in-out infinite;
    animation-delay: 2s;
}

.float-3 {
    animation: float 6s ease-in-out infinite;
    animation-delay: 4s;
}

/* Border Animations */
.border-animate {
    position: relative;
    overflow: hidden;
}

.border-animate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #b48843, transparent);
    animation: borderSlide 3s ease-in-out infinite;
}

@keyframes borderSlide {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Stagger Animation for Lists */
.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* Custom Checkbox Styles */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #b48843;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #b48843;
    font-weight: bold;
}

/* Notification Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #b48843, #9d7037);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 9999;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

/* Success/Error Message Animations */
@keyframes slideInRight {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideOutRight {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

.booking-success-message {
    animation: slideInRight 0.3s ease-out;
}

.success-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.success-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.success-content p {
    margin: 0;
    line-height: 1.4;
    font-size: 0.9rem;
}

/* ===== BLOG CAROUSEL ===== */
.blog-carousel-wrapper {
    position: relative;
}

.blog-carousel {
    transition: transform 0.5s ease-in-out;
}

.blog-slide {
    transition: opacity 0.3s ease;
}

.blog-nav-btn {
    z-index: 10;
    border: 2px solid rgba(180, 136, 67, 0.1);
    transition: all 0.3s ease;
}

.blog-nav-btn:hover {
    border-color: rgba(180, 136, 67, 0.3);
    transform: scale(1.1);
}

.blog-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

.blog-dot.active {
    background-color: #b48843 !important;
}

.blog-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-dot:hover {
    transform: scale(1.2);
}

/* Blog Post Cards */
.blog-slide article {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-slide article .p-6 {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-slide article p {
    flex-grow: 1;
}

/* ===== INSTAGRAM FEED ===== */
.instagram-post {
    background: linear-gradient(135deg, #f8f6f0, #f0ebd9);
    border: 1px solid rgba(180, 136, 67, 0.1);
    transition: all 0.3s ease;
}

.instagram-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.instagram-post img {
    transition: transform 0.3s ease;
}

.instagram-post:hover img {
    transform: scale(1.05);
}

/* Instagram Overlay Animation */
.instagram-post .absolute {
    backdrop-filter: blur(2px);
}

/* Instagram Grid Responsive */
@media (max-width: 768px) {
    .instagram-post {
        margin-bottom: 1rem;
    }
}

/* ===== CAROUSEL RESPONSIVE ===== */
@media (max-width: 1024px) {
    .blog-nav-btn {
        position: static;
        transform: none;
        margin: 1rem auto;
    }
    
    .blog-prev {
        order: 1;
    }
    
    .blog-next {
        order: 2;
    }
    
    .blog-carousel-wrapper {
        margin: 0;
    }
}

@media (max-width: 768px) {
    .blog-carousel {
        margin: 0 -1rem;
    }
    
    .blog-slide {
        padding: 0 1rem;
    }
    
    .blog-nav-btn {
        display: none;
    }
    
    /* Touch scrolling for mobile */
    .blog-carousel-wrapper {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .blog-carousel {
        scroll-snap-align: start;
    }
    
    .blog-slide {
        scroll-snap-align: start;
        min-width: 300px;
    }
}

/* ===== ANIMATION DELAYS FOR BLOG CARDS ===== */
.blog-slide:nth-child(1) {
    animation-delay: 0.1s;
}

.blog-slide:nth-child(2) {
    animation-delay: 0.2s;
}

.blog-slide:nth-child(3) {
    animation-delay: 0.3s;
}

/* ===== INSTAGRAM HOVER EFFECTS ===== */
.instagram-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(180, 136, 67, 0.1), rgba(130, 88, 47, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.instagram-post:hover::before {
    opacity: 1;
}

/* ===== HASHTAG STYLING ===== */
.bg-countryside-100 {
    background-color: #f0ebd9;
}

.text-countryside-700 {
    color: #82582f;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .auto-dark .bg-white {
        background-color: #2a2a2a !important;
        color: #ffffff !important;
    }
    
    .auto-dark .text-gray-600 {
        color: #b0b0b0 !important;
    }
    
    .auto-dark .bg-gray-50 {
        background-color: #1f1f1f !important;
    }
    
    .auto-dark .instagram-post {
        background: linear-gradient(135deg, #2a2a2a, #333333);
        border-color: rgba(180, 136, 67, 0.3);
    }
}