/* FSJES Fès - Main Styles */

:root {
    --color-primary-dark: #0D2149;
    --color-primary-blue: #005A9E;
    --color-accent: #D4A017;
    --color-background: #fff;
    --color-background-alt: #f4f7fc;
    --color-text-dark: #212529;
    --color-text-light: #6c757d;
    --font-body: 'Poppins', sans-serif;
    --font-heading: 'Lora', serif;
    --spacing-s: 8px;
    --spacing-m: 16px;
    --spacing-l: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 64px;
    --radius: 8px;
    --shadow: 0 8px 30px rgba(27, 38, 59, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Styles */
*, *:before, *:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

body > #header-placeholder {
    position: sticky;
    top: 0;
    z-index: 1002;
    display: block;
}

body > #header-placeholder header.main-header {
    position: static !important;
}

header.main-header {
    position: sticky;
    top: 0;
    z-index: 1002;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--color-primary-blue);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-l);
}

.section {
    padding: var(--spacing-xxl) 0;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: var(--spacing-xl);
}

/* Buttons */
.button-primary, .btn--primary {
    display: inline-block;
    background-color: #d4af37;
    color: #1a2233;
    padding: 12px var(--spacing-l);
    border-radius: var(--radius);
    font-weight: 700;
    border: 2px solid var(--color-accent);
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    animation: pulse 2.5s infinite;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.button-primary:hover, .btn--primary:hover, .btn--primary:focus {
    background-color: #b8932e;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
    outline: none;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(212, 160, 23, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(212, 160, 23, 0.3);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 33, 73, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: modalFadeInBg 0.5s;
}

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

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    color: var(--color-text-dark);
    padding: var(--spacing-xl);
    border-radius: 18px;
    box-shadow: 0 16px 48px 0 rgba(0,0,0,0.25), 0 1.5px 8px 0 rgba(0,0,0,0.08);
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: translateY(-60px) scale(0.85) rotateX(30deg);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: modalPopIn 0.5s;
}

@keyframes modalPopIn {
    0% {
        transform: translateY(-60px) scale(0.85) rotateX(30deg);
        opacity: 0;
    }
    80% {
        transform: translateY(10px) scale(1.03) rotateX(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1) rotateX(0deg);
        opacity: 1;
    }
}

.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1) rotateX(0deg);
    opacity: 1;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-m);
    color: var(--color-primary-dark);
}

.modal-body p {
    margin: 0 0 1rem;
    line-height: 1.8;
    color: var(--color-text-light);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #ccc;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--color-accent);
    transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}
