/**
 * Stayara Stylesheet
 * Modern, elegant hotel booking design
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --midnight: #0f1419;
    --slate: #1a2332;
    --ocean: #1e3a4c;
    --teal: #2d5a6b;
    --gold: #c9a962;
    --gold-light: #e8d5a3;
    --cream: #faf8f5;
    --warm-white: #ffffff;
    --text-muted: #8b9199;
    --text-body: #4a5568;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;

    --shadow-soft: 0 4px 20px rgba(15, 20, 25, 0.08);
    --shadow-medium: 0 8px 40px rgba(15, 20, 25, 0.12);
    --shadow-strong: 0 20px 60px rgba(15, 20, 25, 0.2);

    --transition: all 0.3s ease;
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

/* ========================================
   Reset & Base
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input, select, textarea {
    font-family: inherit;
}

/* ========================================
   Header
   ======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(15, 20, 25, 0.5), transparent);
    transition: var(--transition);
}

header.scrolled {
    background: var(--warm-white);
    box-shadow: var(--shadow-soft);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--midnight);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--warm-white);
    letter-spacing: 0.02em;
    transition: var(--transition);
}

header.scrolled .logo-text {
    color: var(--midnight);
}

nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}

header.scrolled nav a {
    color: var(--text-body);
}

nav a:hover,
nav a.active {
    color: var(--gold);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

.nav-cta {
    background: var(--gold);
    color: var(--midnight) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--gold);
    color: var(--midnight);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

header.scrolled .user-name {
    color: var(--text-body);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--warm-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    min-width: 180px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-body);
}

.user-dropdown a:hover {
    background: var(--cream);
    color: var(--ocean);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 0.5rem 0;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--warm-white);
    transition: var(--transition);
}

header.scrolled .mobile-menu-btn span {
    background: var(--midnight);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--warm-white);
    padding: 1rem;
    box-shadow: var(--shadow-medium);
    flex-direction: column;
    gap: 0.5rem;
    z-index: 99;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    padding: 1rem;
    color: var(--text-body);
    border-radius: 8px;
}

.mobile-nav a:hover {
    background: var(--cream);
    color: var(--ocean);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    background:
        linear-gradient(to bottom, rgba(15, 20, 25, 0.4) 0%, rgba(15, 20, 25, 0.6) 100%),
        url('https://images.unsplash.com/photo-1566073771259-6a8506099945?w=1920&q=80') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem 4rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--cream), transparent);
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: var(--warm-white);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge span {
    color: var(--gold-light);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 600;
    color: var(--warm-white);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero h1 em {
    font-style: italic;
    color: var(--gold-light);
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ========================================
   Search Box
   ======================================== */
.search-box {
    background: var(--warm-white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-strong);
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    z-index: 10;
    animation: fadeInUp 1s ease 0.3s both;
}

.search-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-group input,
.form-group select {
    border: 2px solid #e8ecf0;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: var(--midnight);
    transition: var(--transition);
    background: var(--cream);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--teal);
    background: var(--warm-white);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: linear-gradient(135deg, var(--ocean) 0%, var(--slate) 100%);
    color: var(--warm-white);
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: fit-content;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(30, 58, 76, 0.4);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Trust Section
   ======================================== */
.trust-section {
    padding: 4rem 3rem;
    background: var(--cream);
}

.trust-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.trust-item svg {
    width: 24px;
    height: 24px;
    color: var(--teal);
}

.trust-item strong {
    color: var(--midnight);
}

/* ========================================
   Section Styles
   ======================================== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--midnight);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ========================================
   Featured Destinations
   ======================================== */
.featured {
    padding: 6rem 3rem;
    background: var(--warm-white);
}

.destinations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.destination-card {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    transition: var(--transition);
}

.destination-card:first-child {
    grid-row: span 2;
    aspect-ratio: auto;
}

.destination-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.destination-card:hover img {
    transform: scale(1.1);
}

.destination-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 20, 25, 0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    transition: var(--transition);
}

.destination-card:hover .destination-overlay {
    background: linear-gradient(to top, rgba(15, 20, 25, 0.9) 0%, rgba(15, 20, 25, 0.3) 100%);
}

.destination-overlay h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--warm-white);
    margin-bottom: 0.25rem;
}

.destination-overlay span {
    color: var(--gold-light);
    font-size: 0.9rem;
}

/* ========================================
   Why Stayara Section
   ======================================== */
.why-section {
    padding: 6rem 3rem;
    background: var(--slate);
    position: relative;
    overflow: hidden;
}

.why-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201, 169, 98, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.why-section .section-header h2,
.why-section .section-header p {
    color: var(--warm-white);
}

.why-section .section-header p {
    color: rgba(255, 255, 255, 0.7);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    transition: var(--transition);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--midnight);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--warm-white);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    padding: 8rem 3rem;
    background: var(--cream);
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--midnight);
    margin-bottom: 1.5rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--ocean) 0%, var(--slate) 100%);
    color: var(--warm-white);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(30, 58, 76, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--midnight);
    border: 2px solid var(--midnight);
}

.btn-secondary:hover {
    background: var(--midnight);
    color: var(--warm-white);
}

.btn-gold {
    background: var(--gold);
    color: var(--midnight);
}

.btn-gold:hover {
    background: var(--gold-light);
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: var(--midnight);
    padding: 4rem 3rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo-text {
    color: var(--warm-white);
    margin-bottom: 1rem;
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gold);
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: var(--warm-white);
}

.footer-social a:hover svg {
    fill: var(--midnight);
}

.footer-links h4 {
    color: var(--warm-white);
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a:hover {
    color: var(--gold);
}

/* ========================================
   Flash Messages
   ======================================== */
.flash-message {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
}

.flash-close:hover {
    opacity: 1;
}

/* ========================================
   Form Elements
   ======================================== */
.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e8ecf0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--teal);
}

.form-control.error {
    border-color: #dc3545;
}

.form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .search-form {
        grid-template-columns: 1fr 1fr;
    }

    .destinations-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .destination-card:first-child {
        grid-row: span 1;
        aspect-ratio: 3/4;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
    }

    nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 6rem 1.5rem 3rem;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .trust-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .featured, .why-section, .cta-section {
        padding: 4rem 1.5rem;
    }

    .destinations-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   Loading States
   ======================================== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Cards
   ======================================== */
.card {
    background: var(--warm-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-5px);
}

.card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--midnight);
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ocean);
}

.card-price small {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.875rem;
}
