/**
 * Travel Agency Management System - Global Styles
 * Unified design system for all pages
 * Premium Islamic-themed design
 */

/* ==========================================
   CSS VARIABLES - Design Tokens
   ========================================== */
:root {
    /* Brand Colors */
    --primary-gold: #B87333;
    --primary-blue: #122E5B;
    --light-gold: #D4AF37;
    --dark-blue: #0A1E3F;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(18, 46, 91, 0.08);
    --shadow-md: 0 8px 24px rgba(18, 46, 91, 0.12);
    --shadow-lg: 0 16px 48px rgba(18, 46, 91, 0.16);
    --shadow-gold: 0 8px 24px rgba(184, 115, 51, 0.25);
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 15px;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;
}

/* ==========================================
   GLOBAL RESETS & BASE STYLES
   ========================================== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: #333;
    background: #fff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    transition: var(--transition-fast);
}

/* ==========================================
   CONTAINER & LAYOUT
   ========================================== */
   
/* Use Bootstrap's container but ensure it doesn't conflict */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
}

/* Bootstrap responsive breakpoints alignment */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

.section {
    padding: var(--section-padding);
    transition: background-color 0.3s ease;
    overflow-x: hidden;
    width: 100%;
}

.section:nth-child(even) {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.section:nth-child(odd) {
    background: white;
}

.section-alt {
    background: linear-gradient(135deg, rgba(18, 46, 91, 0.02) 0%, rgba(184, 115, 51, 0.02) 100%);
}

/* ==========================================
   SECTION TITLES
   ========================================== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gold);
    border-radius: 2px;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
    margin-top: 20px;
}

/* ==========================================
   BUTTONS - Global Button Styles
   ========================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary-gold), var(--light-gold));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    transition: left 0.5s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-primary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(5px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* ==========================================
   PACKAGE CARDS - Universal Package Design
   ========================================== */
.package-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin-top: 40px;
}

.package-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    position: relative;
    border: 1px solid rgba(18, 46, 91, 0.08);
    transform: translateZ(0);
    will-change: transform;
}



.package-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
    border-color: var(--primary-gold);
}

.package-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
}

.package-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(18, 46, 91, 0.7) 100%);
    z-index: 1;
    opacity: 0;
    transition: var(--transition-smooth);
}

.package-card:hover .package-image::before {
    opacity: 1;
}

.package-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
    transform: scale(1);
}

.package-card:hover .package-image img {
    transform: scale(1.08);
}

/* Islamic Pattern for Placeholder Images */
.package-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(45deg, rgba(184, 115, 51, 0.08) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(184, 115, 51, 0.08) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(184, 115, 51, 0.08) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(184, 115, 51, 0.08) 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
    z-index: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.package-image:has(img[src*="placehoder"])::after,
.package-image:has(img[src=""])::after,
.package-image:has(img[src$="null"])::after,
.package-image.has-islamic-pattern::after {
    opacity: 1;
}

.package-image.has-islamic-pattern {
    background: linear-gradient(135deg, 
        rgba(18, 46, 91, 0.05) 0%, 
        rgba(184, 115, 51, 0.05) 100%);
}

.package-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-gold), var(--light-gold));
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(184, 115, 51, 0.4);
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.package-featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-blue);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 5px;
}

.package-featured-badge i {
    color: var(--light-gold);
}

.package-body {
    padding: 30px;
}

.package-title {
    font-size: 1.35rem;
    color: var(--primary-blue);
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
    min-height: 60px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.package-desc {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 18px;
    line-height: 1.7;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.package-meta {
    display: flex;
    gap: 18px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    border-bottom: 2px solid #f5f5f5;
}

.package-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.package-meta-item:hover {
    background: rgba(184, 115, 51, 0.1);
    color: var(--primary-gold);
}

.package-meta-item i {
    color: var(--primary-gold);
    font-size: 1rem;
}

.package-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.package-price {
    font-size: 2rem;
    color: var(--primary-gold);
    font-weight: 700;
    line-height: 1;
}

.package-price-label {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.package-price-old {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}

.package-discount {
    background: #ff4444;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.package-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.package-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-gold), var(--light-gold));
    transition: left 0.5s ease;
}

.package-btn:hover::before {
    left: 0;
}

.package-btn span {
    position: relative;
    z-index: 1;
}

.package-btn i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.package-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.package-btn:hover i {
    transform: translateX(5px);
}

/* ==========================================
   PAGE BANNER - Universal Banner for All Pages
   ========================================== */
.page-banner {
    position: relative;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    padding: 100px 0 80px;
    text-align: center;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 10 L60 40 L90 40 L65 60 L75 90 L50 70 L25 90 L35 60 L10 40 L40 40 Z" fill="%23D4AF37" opacity="0.1"/></svg>');
    background-size: 100px 100px;
    opacity: 0.5;
    animation: float 30s linear infinite;
}

@keyframes float {
    from { background-position: 0 0; }
    to { background-position: 100px 100px; }
}

.page-banner::after {
    content: '☪';
    position: absolute;
    top: 50%;
    right: 10%;
    font-size: 200px;
    opacity: 0.05;
    transform: translateY(-50%);
}

.page-banner-content {
    position: relative;
    z-index: 2;
}

.page-banner h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.page-banner p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

.page-banner.has-image {
    background-size: cover;
    background-position: center;
}

.page-banner.has-image::before {
    background: rgba(18, 46, 91, 0.85);
    opacity: 1;
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--light-gold);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumb-item::after {
    content: '/';
    margin-left: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-item:last-child::after {
    display: none;
}

.breadcrumb-item.active {
    color: white;
}

/* ==========================================
   CONTENT SECTIONS
   ========================================== */
.content-section {
    padding: 60px 0;
}

.content-section h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-weight: 700;
}

.content-section h3 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-weight: 600;
}

.content-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

.content-section ul,
.content-section ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.content-section li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 10px;
}

.content-section img {
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    margin: 30px 0;
}

/* ==========================================
   ANIMATIONS & UTILITIES
   ========================================== */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }
.fade-in:nth-child(6) { animation-delay: 0.6s; }

/* Skeleton Loader */
.img-skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    position: relative;
    overflow: hidden;
}

.img-skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-gold) 100%);
    opacity: 0.05;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    :root {
        --section-padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .page-banner h1 {
        font-size: 2rem;
    }
    
    .page-banner {
        padding: 70px 0 50px;
    }
    
    .package-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .package-title {
        font-size: 1.2rem;
        min-height: auto;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px 30px;
        font-size: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .package-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   SPECIAL OVERRIDES FOR PROTECTED SECTIONS
   ========================================== */

.contact-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
}

.search-section {
    background: linear-gradient(135deg, rgba(18, 46, 91, 0.03) 0%, rgba(184, 115, 51, 0.05) 100%) !important;
}

.shortcode-section:nth-of-type(even) {
    background: linear-gradient(to right, rgba(18, 46, 91, 0.03), rgba(184, 115, 51, 0.02));
}

.shortcode-section:nth-of-type(odd) {
    background: white;
}

/* Shortcode Content Inside Content Pages */
.content-typography .shortcode-section {
    margin: 50px 0;
    padding: 60px 30px;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8f0f7 100%);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(18, 46, 91, 0.08);
    border-left: 4px solid var(--primary-gold);
}

.content-typography .shortcode-section:nth-of-type(odd) {
    background: linear-gradient(135deg, #fef8f0 0%, #fdf4e8 100%);
    border-left: 4px solid var(--primary-blue);
}

.content-typography .shortcode-section:nth-of-type(even) {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8f0f7 100%);
    border-left: 4px solid var(--primary-gold);
}

.content-typography .shortcode-section .section-title {
    margin-bottom: 40px;
    text-align: center;
}

.content-typography .shortcode-section .section-title h2 {
    font-size: 2.2rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.content-typography .shortcode-section .section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-gold), var(--light-gold));
    border-radius: 2px;
}

.content-typography .shortcode-section .section-title p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: 20px;
}
