/* 
 * Ziwilatu Portal - Professional Minimalistic Design System
 * A beautiful, modern UI that users will love
 */

/* ========================================
   1. GLOBAL STYLES & FOUNDATION
   ======================================== */

:root {
    /* Primary Brand Colors - Elegant earth tones */
    --primary: #CD853F;        /* Peru/Terracotta */
    --primary-dark: #8B4513;   /* Saddle Brown */
    --primary-light: #DEB887;  /* Burlywood */
    
    /* Accent Colors */
    --accent: #FFD700;         /* Gold */
    --accent-light: #FFF8DC;   /* Cornsilk */
    
    /* Neutrals - Professional grayscale */
    --white: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    --black: #000000;
    
    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    
    /* Shadows - Layered depth */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-in-out;
}

/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 
                 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, #FFF8DC 0%, #F5E6D3 50%, #E8D5C4 100%);
    position: relative;
    min-height: 100vh;
}

/* Subtle animated background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(205, 133, 63, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 215, 0, 0.05) 0%, transparent 40%);
    animation: gentleGlow 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes gentleGlow {
    0% { opacity: 0.4; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.05); }
}

/* ========================================
   2. CONTAINER & LAYOUT
   ======================================== */

.main-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .main-container {
        margin: 1rem;
        padding: 1.5rem 1rem;
        border-radius: var(--radius-lg);
    }
}

/* ========================================
   3. TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--gray-600);
}

/* ========================================
   4. HERO SECTION
   ======================================== */

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-xl);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(1.1); }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .hero {
        padding: 2rem 1.5rem;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* ========================================
   5. CARDS & CONTENT BLOCKS
   ======================================== */

.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

.card-body {
    color: var(--gray-700);
}

/* ========================================
   6. BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #5C2D0F 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #D97706 100%);
    color: var(--white);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    color: var(--white);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ========================================
   7. FORMS
   ======================================== */

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(205, 133, 63, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   8. ALERTS & NOTIFICATIONS
   ======================================== */

.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    background-color: var(--gray-50);
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #D1FAE5;
    border-color: var(--success);
    color: #065F46;
}

.alert-warning {
    background-color: #FEF3C7;
    border-color: var(--warning);
    color: #92400E;
}

.alert-danger {
    background-color: #FEE2E2;
    border-color: var(--danger);
    color: #991B1B;
}

.alert-info {
    background-color: #DBEAFE;
    border-color: var(--info);
    color: #1E40AF;
}

/* ========================================
   9. LISTS & SCROLLABLE CONTAINERS
   ======================================== */

.list-container {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.scrollable-list {
    max-height: 600px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.scrollable-list::-webkit-scrollbar {
    width: 8px;
}

.scrollable-list::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.scrollable-list::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: var(--radius-full);
}

.scrollable-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.list-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition-fast);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background-color: var(--accent-light);
    transform: translateX(4px);
}

.list-item-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    text-decoration: none;
    display: block;
    transition: var(--transition-fast);
}

.list-item-title:hover {
    color: var(--primary);
}

.list-item-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ========================================
   10. BADGES & PILLS
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-primary {
    background: var(--primary);
    color: var(--white);
}

.badge-success {
    background: var(--success);
    color: var(--white);
}

.badge-warning {
    background: var(--warning);
    color: var(--white);
}

.badge-danger {
    background: var(--danger);
    color: var(--white);
}

.badge-info {
    background: var(--info);
    color: var(--white);
}

.badge-secondary {
    background: var(--gray-500);
    color: var(--white);
}

/* ========================================
   11. NAVIGATION
   ======================================== */

.navbar {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white) !important;
    text-decoration: none;
    transition: var(--transition-fast);
}

.navbar-brand:hover {
    color: var(--accent) !important;
    transform: scale(1.05);
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--white) !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: var(--accent) !important;
    background-color: rgba(255, 215, 0, 0.15);
}

/* ========================================
   12. SUBSCRIPTION FORM
   ======================================== */

.subscription-box {
    background: linear-gradient(135deg, var(--accent-light) 0%, #FFF5E1 100%);
    border: 2px solid var(--accent);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.subscription-box h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.subscription-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 1.5rem auto 0;
}

@media (max-width: 576px) {
    .subscription-form {
        flex-direction: column;
    }
}

.subscription-form input {
    flex: 1;
}

/* ========================================
   13. CAROUSEL ENHANCEMENTS
   ======================================== */

.carousel {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    margin-bottom: 2rem;
}

.carousel-inner {
    border-radius: var(--radius-xl);
}

.carousel-item img {
    border-radius: var(--radius-xl);
    object-fit: cover;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.carousel-indicators button.active {
    background-color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.3);
}

/* ========================================
   14. DOWNLOAD CARDS
   ======================================== */

.download-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    height: 100%;
}

.download-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.download-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.download-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.download-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* ========================================
   15. UTILITIES
   ======================================== */

.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--gray-600) !important; }

.bg-light { background-color: var(--gray-50) !important; }
.bg-primary { background-color: var(--primary) !important; }

.rounded { border-radius: var(--radius) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }

.shadow { box-shadow: var(--shadow) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.mt-5 { margin-top: 3rem !important; }

.text-center { text-align: center !important; }

/* ========================================
   16. LOADING & ANIMATIONS
   ======================================== */

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

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

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ========================================
   17. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .main-container {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 1.5rem;
    }
    
    .subscription-box {
        padding: 1.5rem;
    }
    
    .card {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }
    
    .main-container {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    body::before {
        display: none;
    }
    
    .main-container {
        box-shadow: none;
        margin: 0;
    }
    
    .navbar,
    .btn,
    .subscription-box {
        display: none !important;
    }
}
