/* Morocco Dreams WordPress Theme Styles */

/* CSS Custom Properties */
:root {
    /* Morocco-inspired color palette */
    --background: 35 25% 97%;
    --foreground: 25 15% 15%;
    --card: 35 30% 98%;
    --card-foreground: 25 15% 15%;
    --popover: 35 30% 98%;
    --popover-foreground: 25 15% 15%;
    --primary: 35 85% 45%; /* Desert gold */
    --primary-foreground: 35 25% 97%;
    --secondary: 15 75% 65%; /* Warm terracotta */
    --secondary-foreground: 35 25% 97%;
    --muted: 35 15% 90%;
    --muted-foreground: 25 10% 45%;
    --accent: 220 70% 35%; /* Deep blue */
    --accent-foreground: 35 25% 97%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 35 15% 85%;
    --input: 35 15% 90%;
    --ring: 35 85% 45%;
    --morocco-gold: 45 90% 55%;
    --morocco-terracotta: 15 75% 55%;
    --morocco-blue: 220 70% 35%;
    --morocco-sand: 35 35% 85%;
    --morocco-deep-blue: 220 85% 25%;
    --gradient-desert: linear-gradient(135deg, hsl(var(--morocco-gold)), hsl(var(--morocco-terracotta)));
    --gradient-sky: linear-gradient(180deg, hsl(var(--morocco-blue)), hsl(var(--morocco-deep-blue)));
    --gradient-sunset: linear-gradient(45deg, hsl(var(--morocco-gold)) 0%, hsl(15 85% 60%) 50%, hsl(220 70% 45%) 100%);
    --shadow-warm: 0 4px 12px hsla(var(--morocco-terracotta), 0.2);
    --shadow-gold: 0 0 20px hsla(var(--morocco-gold), 0.15);
    --radius: 0.5rem;
}

.dark {
    --background: 25 25% 8%;
    --foreground: 35 25% 95%;
    --card: 25 25% 10%;
    --card-foreground: 35 25% 95%;
    --popover: 25 25% 10%;
    --popover-foreground: 35 25% 95%;
    --primary: 45 90% 55%;
    --primary-foreground: 25 25% 8%;
    --secondary: 15 45% 25%;
    --secondary-foreground: 35 25% 95%;
    --muted: 25 15% 20%;
    --muted-foreground: 35 15% 65%;
    --accent: 220 70% 45%;
    --accent-foreground: 35 25% 95%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 25 15% 25%;
    --input: 25 15% 20%;
    --ring: 45 90% 55%;
}

/* Base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
}

.modal-open {
    overflow: hidden;
}

/* Utility classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.py-4 { padding: 1rem 0; }
.py-8 { padding: 2rem 0; }
.py-12 { padding: 3rem 0; }
.py-20 { padding: 5rem 0; }

.px-4 { padding: 0 1rem; }
.px-6 { padding: 0 1.5rem; }
.px-8 { padding: 0 2rem; }

/* Navigation */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: hsla(0, 0%, 100%, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

.navigation.scrolled {
    background: hsl(0, 0%, 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo-container img {
    max-height: 2.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient-desert);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    text-decoration: none;
    color: hsl(var(--foreground));
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a[aria-current="page"] {
    color: hsl(var(--morocco-gold));
}

.nav-cta {
    background: var(--gradient-sky);
    color: hsl(var(--secondary-foreground));
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, background 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, hsl(var(--morocco-deep-blue)), hsl(var(--morocco-blue)));
}

.nav-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-info {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.contact-info svg {
    margin-right: 0.5rem;
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: hsl(var(--foreground));
}

.mobile-menu-toggle:focus {
    outline: 2px solid hsl(var(--morocco-gold));
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: hsl(var(--background));
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
}

.mobile-nav-menu li {
    margin: 1rem 0;
}

.mobile-nav-menu li a {
    color: hsl(var(--foreground));
    text-decoration: none;
    font-size: 1.1rem;
}

.mobile-nav-menu li a:hover,
.mobile-nav-menu li a[aria-current="page"] {
    color: hsl(var(--morocco-gold));
}

.mobile-cta {
    margin-top: 1rem;
    text-align: center;
}

/* Hero Section */
.hero,
.trip-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: hsl(var(--primary-foreground));
    text-align: center;
}

.hero-bg,
.trip-hero .hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg img,
.trip-hero .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg.placeholder-bg {
    background: hsl(var(--morocco-sand));
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero h1,
.trip-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: bold;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: hsl(var(--primary-foreground));
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: hsla(var(--primary-foreground), 0.7);
}

/* Trip Meta */
.trip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 1rem;
    color: hsl(var(--primary-foreground));
}

.trip-meta .duration,
.trip-meta .rating,
.trip-meta .price {
    background: hsla(var(--morocco-blue), 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn:focus {
    outline: 2px solid hsl(var(--morocco-gold));
    outline-offset: 2px;
}

.btn-primary {
    background: var(--gradient-desert);
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    background: linear-gradient(135deg, hsl(var(--morocco-terracotta)), hsl(var(--morocco-gold)));
    transform: translateY(-1px);
}

.btn-outline {
    border: 2px solid hsl(var(--primary-foreground));
    color: hsl(var(--primary-foreground));
    background: transparent;
}

.btn-outline:hover {
    background: hsl(var(--primary-foreground));
    color: hsl(var(--morocco-blue));
}

.btn-secondary {
    background: var(--gradient-sky);
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
    background: linear-gradient(135deg, hsl(var(--morocco-deep-blue)), hsl(var(--morocco-blue)));
}

.btn.w-full {
    width: 100%;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.filter-buttons button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-buttons button.active {
    background: var(--gradient-sky);
    color: hsl(var(--secondary-foreground));
    border-color: hsl(var(--morocco-blue));
}

.filter-buttons button:hover {
    background: hsl(var(--morocco-gold));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--morocco-gold));
}

/* Cards */
.card {
    background: hsl(var(--card));
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow-warm);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-image-container {
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: hsl(var(--card-foreground));
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-title a:hover {
    color: hsl(var(--morocco-gold));
}

.card-description {
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Trip Highlights */
.highlights-list {
    list-style: none;
    padding: 0;
}

.highlights-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.highlights-list li:hover {
    transform: translateX(5px);
}

.highlights-list li:before {
    content: '✔';
    position: absolute;
    left: 0;
    color: hsl(var(--morocco-gold));
}

/* Grid layouts */
.grid {
    display: grid;
    gap: 2rem;
}

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

/* Modal (MicroModal compatible) */
.modal {
    display: none;
}

.modal.is-open {
    display: block;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background: hsl(var(--background));
    padding: 2rem;
    max-width: 32rem;
    width: 90%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-warm);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Add to existing .modal-close styles */
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: hsl(var(--foreground));
    position: relative;
    z-index: 1001; /* Ensure it's above other modal content */
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: hsl(var(--morocco-gold));
}

.modal-close:focus {
    outline: 2px solid hsl(var(--morocco-gold));
    outline-offset: 2px;
}

.modal-content {
    color: hsl(var(--foreground));
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--input));
    color: hsl(var(--foreground));
    font-size: 1rem;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: hsl(var(--morocco-gold));
    box-shadow: 0 0 0 3px hsla(var(--morocco-gold), 0.1);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.price-summary {
    margin: 1.5rem 0;
    padding: 1rem;
    background: hsl(var(--muted));
    border-radius: var(--radius);
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.price-row.total {
    font-weight: bold;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid hsl(var(--border));
}

.price-row .morocco-gold {
    font-weight: bold;
}

/* Footer */
.footer {
    background: hsl(var(--foreground));
    color: hsl(var(--background));
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: hsla(var(--background), 0.8);
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a:hover {
    color: hsl(var(--background));
}

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

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

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

.social-link svg {
    fill: currentColor;
}

.footer-bottom {
    border-top: 1px solid hsla(var(--background), 0.2);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.6;
}

.footer-bottom-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.footer-bottom-links a {
    color: hsla(var(--background), 0.8);
}

.footer-bottom-links a:hover {
    color: hsl(var(--background));
}

/* Morocco-specific styling */
.morocco-gold { color: hsl(var(--morocco-gold)); }
.morocco-terracotta { color: hsl(var(--morocco-terracotta)); }
.morocco-blue { color: hsl(var(--morocco-blue)); }

.bg-morocco-gold { background-color: hsl(var(--morocco-gold)); }
.bg-morocco-terracotta { background-color: hsl(var(--morocco-terracotta)); }
.bg-morocco-blue { background-color: hsl(var(--morocco-blue)); }

.gradient-text {
    background: var(--gradient-desert);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive design */
@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .hero-content,
    .trip-hero .hero-content {
        max-width: 48rem;
    }
}

@media (min-width: 768px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .nav-menu,
    .nav-contact {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero,
    .trip-hero {
        min-height: 40vh;
    }

    .hero h1,
    .trip-hero h1 {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }

    .form-row {
        flex-direction: column;
    }

    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }

    .filter-buttons button {
        width: 100%;
        max-width: 200px;
    }
}

/* Animations */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-10px); }
    70% { transform: translateY(-5px); }
    90% { transform: translateY(-2px); }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1.5rem;
    height: 2.5rem;
    border: 2px solid hsl(var(--primary-foreground));
    border-radius: 1.25rem;
    display: flex;
    justify-content: center;
}

.scroll-indicator::before {
    content: '';
    width: 0.25rem;
    height: 0.75rem;
    background: hsl(var(--primary-foreground));
    border-radius: 0.125rem;
    margin-top: 0.5rem;
    animation: bounce 2s infinite;
}