/* File: css/main.css */
/* ============================================
   MAIN.CSS - Core Styles & Shared Components
   ============================================ */

/* CSS VARIABLES */
:root {
    /* Colors */
    --dark-bg: #1a1a2e;
    --dark-bg-end: #0f0f23;
    --light-bg: #fafafa;
    --text-dark: #f5f5f5;
    --text-light: #2d2d2d;
    --text-muted: #6c757d;
    
    --accent-purple: #9d4edd;
    --accent-gold: #ffd700;
    --interactive: #64ffda;
    --primary-color: #28a745;
    --secondary-color: #20c997;
    --success-color: #10B981;
    --bridge-color: #667eea;
    --wisdom-color: #764ba2;
    
    /* Gradients */
    --gradient-dark: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg-end) 100%);
    --gradient-primary: linear-gradient(135deg, var(--bridge-color) 0%, var(--wisdom-color) 100%);
    --gradient-success: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 5rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 24px;
    
    /* Transitions */
    --transition-fast: 200ms ease;
    --transition-default: all 0.3s ease;
}

/* Add this to your CSS if you're using Bootstrap Icons or custom fonts */
@font-face {
    font-family: 'bootstrap-icons';
    font-display: swap; /* This prevents invisible text during font load */
    src: url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/fonts/bootstrap-icons.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/fonts/bootstrap-icons.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

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

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Heebo', Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* TYPOGRAPHY */
h1, .h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2, .h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h3, .h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

h4, .h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.8;
}

/* NAVIGATION */
.modern-nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: var(--transition-default);
}

.modern-nav.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.nav-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--bridge-color);
    text-decoration: none;
}

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

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bridge-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--gradient-primary);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

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

/* FOOTER */
.modern-footer {
    background: #0a0e27;
    color: var(--text-dark);
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--interactive) 20%, var(--bridge-color) 50%, var(--interactive) 80%, transparent);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.footer-tagline {
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    transition: var(--transition-default);
    text-decoration: none;
}

.social-link:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
}

.footer-column h4 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--interactive);
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 15px;
    transition: var(--transition-default);
}

.footer-links a:hover {
    color: var(--interactive);
    transform: translateX(5px);
    display: inline-block;
}

/* Footer Newsletter (Stay Connected) */
.footer-newsletter {
    display: block;
}
.footer-newsletter .newsletter-input-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 8px 8px 8px 14px;
    align-items: center;
}
.footer-newsletter .newsletter-input-wrap i {
    display: none; /* reserved if you want an icon inside */
}
.footer-newsletter input[type="email"] {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 15px;
    width: 100%;
}
.footer-newsletter input::placeholder {
    color: rgba(255,255,255,0.6);
}
.footer-newsletter .btn-subscribe {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}
.footer-newsletter .btn-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102,126,234,0.3);
}
.footer-newsletter .newsletter-note {
    display: block;
    margin-top: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

/* Footer bottom */
.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

.footer-legal-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    text-decoration: none;
}

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

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-default);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

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

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
}

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

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 184, 0, 0.3);
}

/* CARDS */
.modern-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    height: 100%;
}

/* UTILITIES */
.text-center { text-align: center; }
.text-white-50 { color: rgba(255, 255, 255, 0.5); }
.text-white-70 { color: rgba(255, 255, 255, 0.7); }

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

/* ANIMATIONS */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* FOCUS STATES */
*:focus {
    outline: none !important;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu { display: none; }
    .modern-card { padding: 1.5rem; }
    section { padding: 60px 0; }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
}

/* ============================================
   PAGE LOAD FADE-IN EFFECT
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    pointer-events: none;
    animation: pageFadeOut 0.7s ease-out forwards;
}

@keyframes pageFadeOut {
    0% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}
