/*
Theme Name: SaharaTrek
Description: Custom theme for SaharaTrek Morocco Tours
Version: 1.0.0
Author: SaharaTrek
Text Domain: saharatrek
*/

/* === Variables === */
:root {
    --st-primary: #C4703F;
    --st-primary-dark: #a85d33;
    --st-secondary: #D4A574;
    --st-dark: #2C2416;
    --st-cream: #FAF6F1;
    --st-gray: #6b7280;
    --st-white: #ffffff;
    --st-gold: #B8860B;
    --st-font-heading: 'Playfair Display', Georgia, serif;
    --st-font-body: 'Inter', -apple-system, sans-serif;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--st-font-body); font-size: 16px; line-height: 1.6; color: var(--st-dark); background: var(--st-white); }
h1, h2, h3, h4, h5, h6 { font-family: var(--st-font-heading); font-weight: 600; line-height: 1.2; margin: 0 0 1rem; }
p { margin: 0 0 1rem; }
a { color: var(--st-primary); text-decoration: none; }
a:hover { color: var(--st-primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* === Layout === */
.st-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.st-section { padding: 80px 0; }
.st-bg-cream { background: var(--st-cream); }

/* === Grid === */
.st-grid { display: grid; gap: 30px; }
.st-grid-2 { grid-template-columns: repeat(2, 1fr); }
.st-grid-3 { grid-template-columns: repeat(3, 1fr); }
.st-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .st-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .st-grid-2, .st-grid-3, .st-grid-4 { grid-template-columns: 1fr; }
    .st-section { padding: 50px 0; }
}

/* === Buttons === */
.st-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}
.st-btn-primary { background: var(--st-primary); color: var(--st-white); }
.st-btn-primary:hover { background: var(--st-primary-dark); color: var(--st-white); }
.st-btn-secondary { background: transparent; color: var(--st-primary); border: 2px solid var(--st-primary); }
.st-btn-secondary:hover { background: var(--st-primary); color: var(--st-white); }
.st-btn-white { background: var(--st-white); color: var(--st-primary); }
.st-btn-white:hover { background: var(--st-cream); color: var(--st-primary); }
.st-btn-sm { padding: 8px 18px; font-size: 14px; }
.st-btn-lg { padding: 16px 36px; font-size: 17px; }

/* === Header === */
.st-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--st-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}
.st-header .st-container {
    max-width: 100%;
    padding: 0 30px;
}
.st-header__inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 50px;
    height: 80px;
    max-width: 1400px;
}
.st-header__logo { flex-shrink: 0; }
.st-header__logo a { display: block; line-height: 0; }
.st-header__logo img { max-height: 50px; width: auto; display: block; }
.st-header__logo .custom-logo-link { display: block; line-height: 0; }
.st-header__logo-text { font-family: var(--st-font-heading); font-size: 28px; font-weight: 700; color: var(--st-dark); }
.st-header__logo-text span { color: var(--st-primary); }
.st-nav { margin-left: auto; }

/* Nav */
.st-nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.st-nav a { color: var(--st-dark); font-weight: 500; font-size: 15px; padding: 8px 0; }
.st-nav a:hover { color: var(--st-primary); }
.st-nav .current-menu-item a { color: var(--st-primary); }

/* Mobile Menu */
.st-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.st-menu-toggle span { display: block; width: 25px; height: 2px; background: var(--st-dark); margin: 5px 0; transition: 0.3s; }

@media (max-width: 768px) {
    .st-menu-toggle { display: block; z-index: 1001; }
    .st-nav { display: none; position: absolute; top: 80px; left: 0; right: 0; background: var(--st-white); padding: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); z-index: 1000; }
    .st-nav.active { display: block !important; }
    .st-nav ul { flex-direction: column; gap: 0; }
    .st-nav li { border-bottom: 1px solid #eee; }
    .st-nav a { display: block; padding: 15px 0; }
    .st-header__cta { display: none; }
}

/* === Hero === */
.st-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--st-white);
    padding: 120px 20px 80px;
}
.st-hero__bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--st-primary) 0%, var(--st-dark) 100%);
    background-size: cover;
    background-position: center;
}
.st-hero__bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
}
.st-hero__content { position: relative; z-index: 1; max-width: 800px; }
.st-hero__tagline {
    display: inline-block;
    border: 1px solid var(--st-gold);
    color: var(--st-gold);
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.st-hero__title { font-size: 56px; font-weight: 700; margin-bottom: 20px; }
.st-hero__subtitle { font-size: 20px; opacity: 0.9; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.st-hero__buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 768px) {
    .st-hero { min-height: 80vh; }
    .st-hero__title { font-size: 36px; }
    .st-hero__subtitle { font-size: 17px; }
}

/* === Page Hero === */
.st-page-hero {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--st-white);
    padding: 120px 20px 60px;
}
.st-page-hero__bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--st-primary);
    background-size: cover;
    background-position: center;
}
.st-page-hero__bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}
.st-page-hero__content { position: relative; z-index: 1; }
.st-page-hero__title { font-size: 48px; margin-bottom: 10px; }
.st-page-hero__subtitle { font-size: 18px; opacity: 0.9; }

/* === Section Header === */
.st-section-header { text-align: center; margin-bottom: 50px; }
.st-section-header__tagline {
    display: inline-block;
    color: var(--st-primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.st-section-header h2 { font-size: 40px; margin-bottom: 15px; }
.st-section-header p { color: var(--st-gray); font-size: 18px; max-width: 600px; margin: 0 auto; }

/* === Cards === */
.st-card {
    background: var(--st-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.st-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.st-card__image { position: relative; display: block; overflow: hidden; }
.st-card__image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform 0.5s; }
.st-card:hover .st-card__image img { transform: scale(1.05); }
.st-card__badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--st-primary);
    color: var(--st-white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.st-card__content { padding: 24px; }
.st-card__title { font-size: 20px; margin-bottom: 10px; }
.st-card__title a { color: var(--st-dark); }
.st-card__title a:hover { color: var(--st-primary); }
.st-card__meta { display: flex; gap: 15px; color: var(--st-gray); font-size: 14px; margin-bottom: 12px; }
.st-card__meta svg { width: 16px; height: 16px; margin-right: 4px; vertical-align: middle; }
.st-card__excerpt { color: var(--st-gray); font-size: 15px; margin-bottom: 16px; }
.st-card__footer { display: flex; justify-content: space-between; align-items: center; }
.st-card__price { font-size: 22px; font-weight: 700; color: var(--st-primary); }
.st-card__price .from { font-size: 13px; font-weight: 400; color: var(--st-gray); display: block; }

/* Destination Card */
.st-destination-card .st-card__image { position: relative; }
.st-destination-card .st-card__image img { aspect-ratio: 3/4; object-fit: cover; }
.st-destination-card .st-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    color: var(--st-white);
}
.st-destination-card .st-card__title { margin: 0; font-size: 22px; }
.st-destination-card .st-card__title a { color: var(--st-white); }
.st-destination-card .st-card__count { font-size: 14px; opacity: 0.8; }

/* === Features === */
.st-feature { text-align: center; padding: 30px 20px; }
.st-feature__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--st-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--st-primary);
}
.st-feature h3 { font-size: 20px; margin-bottom: 10px; }
.st-feature p { color: var(--st-gray); font-size: 15px; margin: 0; }

/* === CTA === */
.st-cta {
    position: relative;
    background: var(--st-primary);
    color: var(--st-white);
    padding: 80px 0;
    text-align: center;
}
.st-cta__content h2 { font-size: 40px; margin-bottom: 15px; }
.st-cta__content p { font-size: 18px; opacity: 0.9; margin-bottom: 30px; }

/* === Footer === */
.st-footer { background: var(--st-dark); color: rgba(255,255,255,0.8); padding: 60px 0 30px; }
.st-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.st-footer__brand p { font-size: 15px; line-height: 1.7; }
.st-footer h4 { color: var(--st-white); font-size: 18px; margin-bottom: 20px; }
.st-footer ul { list-style: none; padding: 0; margin: 0; }
.st-footer li { margin-bottom: 10px; }
.st-footer a { color: rgba(255,255,255,0.8); font-size: 15px; }
.st-footer a:hover { color: var(--st-white); }
.st-footer__social { display: flex; gap: 12px; margin-top: 20px; }
.st-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;
    color: var(--st-white);
    transition: background 0.3s;
}
.st-footer__social a:hover { background: var(--st-primary); }
.st-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 30px; text-align: center; font-size: 14px; }

@media (max-width: 768px) {
    .st-footer__inner { grid-template-columns: 1fr; text-align: center; }
    .st-footer__social { justify-content: center; }
}

/* === Page Content === */
.st-page-content { padding: 60px 0; }
.st-page-content .st-container { max-width: 900px; }

/* === Itinerary === */
.st-itinerary { margin: 40px 0; }
.st-itinerary__day {
    display: flex;
    gap: 30px;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}
.st-itinerary__marker {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--st-primary);
    color: var(--st-white);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.st-itinerary__marker span { font-size: 11px; text-transform: uppercase; }
.st-itinerary__marker strong { font-size: 20px; }
.st-itinerary__content h3 { font-size: 22px; margin-bottom: 10px; }
.st-itinerary__content p { color: var(--st-gray); margin: 0; }

/* === Pricing Table === */
.st-pricing { margin: 40px 0; overflow-x: auto; }
.st-pricing table { width: 100%; border-collapse: collapse; }
.st-pricing th, .st-pricing td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #eee; }
.st-pricing th { background: var(--st-cream); font-weight: 600; }
.st-pricing .price { font-weight: 700; color: var(--st-primary); font-size: 18px; }

/* === Sidebar === */
.st-sidebar {
    background: var(--st-cream);
    padding: 30px;
    border-radius: 12px;
    position: sticky;
    top: 100px;
}
.st-sidebar__price { font-size: 32px; font-weight: 700; color: var(--st-primary); margin-bottom: 5px; }
.st-sidebar__price-label { color: var(--st-gray); font-size: 14px; margin-bottom: 20px; }
.st-sidebar .st-btn { width: 100%; margin-bottom: 15px; }

/* === WordPress Core === */
.alignleft { float: left; margin: 0 30px 25px 0; }
.alignright { float: right; margin: 0 0 25px 30px; }
.aligncenter { display: block; margin: 0 auto 25px; }
.wp-block-image { margin: 25px 0; }

/* Gutenberg image blocks with alignment - better text spacing */
.wp-block-image.alignleft,
.wp-block-image.is-style-st-rounded-sm.alignleft,
.wp-block-image.is-style-st-rounded-md.alignleft,
.wp-block-image.is-style-st-rounded-lg.alignleft,
.wp-block-image.is-style-st-shadow.alignleft,
.wp-block-image.is-style-st-rounded-shadow.alignleft {
    float: left;
    margin: 5px 30px 25px 0;
}

.wp-block-image.alignright,
.wp-block-image.is-style-st-rounded-sm.alignright,
.wp-block-image.is-style-st-rounded-md.alignright,
.wp-block-image.is-style-st-rounded-lg.alignright,
.wp-block-image.is-style-st-shadow.alignright,
.wp-block-image.is-style-st-rounded-shadow.alignright {
    float: right;
    margin: 5px 0 25px 30px;
}

/* Ensure figure inside block also respects spacing */
.wp-block-image.alignleft figure,
.wp-block-image.alignright figure {
    margin: 0;
}

/* Clear floats after content */
.entry-content::after,
.st-itinerary__description::after,
.st-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Mobile: stack images instead of float */
@media (max-width: 600px) {
    .wp-block-image.alignleft,
    .wp-block-image.alignright,
    .alignleft,
    .alignright {
        float: none;
        margin: 20px auto;
    }
}

.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); position: absolute !important; height: 1px; width: 1px; overflow: hidden; }

/* === Admin Bar Fix === */
.admin-bar .st-header { top: 32px; }
@media (max-width: 782px) {
    .admin-bar .st-header { top: 46px; }
}
