/* ===== RESET & VARIABLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary-green: #2D8B41;
    --primary-orange: #F47820;
    --dark: #1A1A1A;
    --light: #F8F9FA;
    --white: #FFFFFF;
    --gray: #6C757D;
}
body { font-family: 'DM Sans', sans-serif; color: var(--dark); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', serif; font-weight: 700; }
img { max-width: 100%; height: auto; }

/* ===== CONTAINER ===== */
.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }

/* ===== HEADER & NAV ===== */
header {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}
nav {
    max-width: 1400px; margin: 0 auto; padding: 0 2rem;
    display: flex; justify-content: space-between; align-items: center;
    position: relative;
}
.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo-icon {
    width: 45px; height: 45px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-orange));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: white; font-size: 1.2rem;
    flex-shrink: 0; overflow: hidden;
}
.logo-text h1 { font-size: 1.3rem; color: var(--primary-green); line-height: 1.2; }
.logo-text p { font-size: 0.7rem; color: var(--gray); letter-spacing: 1px; }

/* Menu toggle (hamburger) */
.menu-toggle {
    display: none; background: none; border: none; cursor: pointer;
    padding: 0.5rem; z-index: 1001; flex-direction: column; gap: 5px;
}
.menu-toggle span {
    display: block; width: 26px; height: 3px;
    background: var(--dark); border-radius: 3px;
    transition: all 0.3s ease;
}
.nav-open .menu-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
.nav-open .menu-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

nav ul { display: flex; list-style: none; gap: 2rem; align-items: center; }
nav a { text-decoration: none; color: var(--dark); font-weight: 500; transition: color 0.3s; }
nav a:hover { color: var(--primary-green); }
.cta-button {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-orange)) !important;
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
}

/* ===== MAIN ===== */
main { margin-top: 80px; min-height: calc(100vh - 80px); }

/* ===== SECTIONS ===== */
.section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-label {
    color: var(--primary-orange); font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    font-size: 0.85rem; margin-bottom: 0.75rem; display: block;
}
.section-title { font-size: 2.2rem; color: var(--dark); margin-bottom: 1rem; }

/* ===== GRIDS ===== */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== CARDS ===== */
.card {
    background: white; border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
    overflow: hidden; transition: transform 0.3s;
}
.card:hover { transform: translateY(-5px); }
.card-content { padding: 1.5rem; }
.card-image {
    width: 100%; aspect-ratio: 7/3;
    background-size: cover; background-position: center;
    background-color: #f5f5f5;
}

/* ===== HERO ===== */
.hero-section {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 3rem; align-items: center; padding: 3rem 0;
}
.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(45,139,65,0.1), rgba(244,120,32,0.1));
    color: var(--primary-green);
    padding: 0.5rem 1.5rem; border-radius: 20px;
    font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem;
    border: 1px solid rgba(45,139,65,0.2);
}
.hero-title { font-size: 2.8rem; margin: 1rem 0; line-height: 1.2; }
.hero-subtitle { font-size: 1.1rem; color: var(--gray); margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-image {
    background: linear-gradient(135deg, #2D8B41, #F47820);
    height: 500px; border-radius: 15px; overflow: hidden;
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.highlight {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-orange));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== STATS ===== */
.stats-section { background: var(--light); padding: 3rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat {
    text-align: center; background: white; padding: 1.5rem 1rem;
    border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.stat-number {
    font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-orange));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.8rem 2rem; border-radius: 30px; font-weight: 600;
    text-decoration: none; display: inline-block; border: none;
    cursor: pointer; transition: all 0.3s; font-size: 0.95rem;
    text-align: center;
}
.btn-primary { background: linear-gradient(135deg, var(--primary-green), var(--primary-orange)); color: white; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--primary-green); border: 2px solid var(--primary-green); }
.btn-secondary:hover { background: var(--primary-green); color: white; }
.btn-full { width: 100%; margin-top: 1rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    background: rgba(45,139,65,0.1); color: var(--primary-green);
    padding: 0.25rem 0.75rem; border-radius: 15px;
    font-size: 0.85rem; font-weight: 600; margin-bottom: 0.75rem;
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.form-control {
    width: 100%; padding: 0.75rem 1rem;
    border: 2px solid #E0E0E0; border-radius: 8px;
    font-size: 1rem; font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary-green); }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-box { background: white; padding: 2rem; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.08); }
.info-box { background: white; padding: 1.5rem; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.08); margin-bottom: 1.5rem; }
.info-box h3 { margin-bottom: 0.75rem; }

/* ===== FORMATION CARD ===== */
.formation-card-image {
    aspect-ratio: 7/3; overflow: hidden; border-radius: 15px 15px 0 0;
    background: #f5f5f5; display: flex; align-items: center; justify-content: center;
}
.formation-card-image img {
    width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.formation-card-image-placeholder {
    background: linear-gradient(135deg, #2D8B41, #F47820);
    aspect-ratio: 7/3; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 2.5rem; font-weight: 700;
    border-radius: 15px 15px 0 0;
}
.card-content h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.card-content > p { font-size: 0.95rem; color: var(--gray); margin: 0.75rem 0; }
.card-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 1rem; flex-wrap: wrap; gap: 0.5rem;
}
.card-price { color: var(--primary-green); font-size: 1.2rem; font-weight: 700; }

/* ===== CAROUSEL ===== */
.carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 7/3;
    border-radius: 15px;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 2rem;
}
.carousel-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.carousel-slide.active {
    opacity: 1;
}
.carousel-slide img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: white;
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 10;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s;
}
.carousel-arrow:hover {
    background: rgba(0,0,0,0.7);
}
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.carousel-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    padding: 0;
}
.carousel-dot.active {
    background: white;
}

/* ===== FORMATION DETAIL ===== */
.detail-grid {
    display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem;
}
.detail-title { font-size: 2rem; margin: 0.75rem 0; line-height: 1.3; }
.detail-description { font-size: 1.05rem; color: var(--gray); margin-bottom: 2rem; line-height: 1.8; }
.detail-sidebar .card { position: sticky; top: 100px; }
.detail-price { font-size: 1.8rem; font-weight: 700; color: var(--primary-green); margin-bottom: 1.5rem; }
.detail-info p { margin-bottom: 0.75rem; font-size: 0.95rem; }

/* ===== CONTACT ===== */
.contact-info { padding-top: 1rem; }
.contact-info h3 { margin-bottom: 1.5rem; font-size: 1.5rem; }
.contact-info p { margin-bottom: 1rem; font-size: 1.05rem; display: flex; align-items: center; gap: 0.5rem; }

/* ===== ABOUT ===== */
.about-content { max-width: 900px; margin: 0 auto; }
.about-content h3 { margin-bottom: 0.75rem; color: var(--primary-green); font-size: 1.4rem; }
.about-content p { font-size: 1.1rem; margin-bottom: 2rem; line-height: 1.8; }

/* ===== INSCRIPTION ===== */
.inscription-container { max-width: 800px; margin: 0 auto; }
.inscription-container h1 { margin-bottom: 0.5rem; }
.inscription-title { color: var(--primary-green); margin-bottom: 2rem; font-size: 1.4rem; }

/* ===== CONFIRMATION ===== */
.confirmation-container { text-align: center; max-width: 600px; margin: 0 auto; padding: 2rem 0; }
.confirmation-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.confirmation-container h2 { color: var(--primary-green); margin-bottom: 1rem; }
.confirmation-container p { font-size: 1.05rem; margin-bottom: 0.5rem; }

/* ===== FILTER BUTTONS ===== */
.filter-buttons {
    display: flex; gap: 0.75rem; justify-content: center;
    margin-bottom: 2rem; flex-wrap: wrap;
}
.filter-buttons .btn { padding: 0.6rem 1.5rem; font-size: 0.9rem; }

/* ===== CENTER BLOCK ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ===== ADMIN TABLE ===== */
.admin-table {
    width: 100%; background: white;
    border-collapse: collapse; border-radius: 12px;
    overflow: hidden; margin-top: 1rem;
}
.admin-table th { background: var(--light); padding: 1rem; text-align: left; font-size: 0.9rem; }
.admin-table td { padding: 1rem; border-top: 1px solid #E0E0E0; font-size: 0.9rem; }
.admin-nav {
    display: flex; gap: 0.75rem; margin: 2rem 0; flex-wrap: wrap;
}

/* ===== FLASH MESSAGES ===== */
.flash-messages-container { position: fixed; top: 90px; right: 1rem; z-index: 9999; max-width: 90vw; }
.flash-message {
    padding: 1rem 1.5rem; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 1rem; min-width: 280px;
}
.flash-success { background: #d4edda; color: #155724; }
.flash-error { background: #f8d7da; color: #721c24; }
.close-flash { float: right; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* ===== FOOTER ===== */
footer { background: var(--dark); color: white; padding: 4rem 0 2rem; margin-top: 4rem; }
.footer-content { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer-section h4 { color: var(--primary-orange); margin-bottom: 1.5rem; font-size: 1.1rem; font-weight: 600; }
.footer-section p { color: rgba(255,255,255,0.8); line-height: 1.8; }
.footer-logo { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.footer-logo h3 { color: white; font-size: 1.2rem; margin-bottom: 0.2rem; }
.footer-logo p { font-size: 0.8rem; color: rgba(255,255,255,0.7); }
.footer-contact { display: flex; flex-direction: column; gap: 1rem; }
.footer-contact p { color: rgba(255,255,255,0.8); display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.95rem; }
.footer-contact span.icon { color: var(--primary-orange); flex-shrink: 0; }
.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    transition: background 0.3s, color 0.3s;
}
.footer-social a:hover {
    background: var(--primary-orange);
    color: white;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem; text-align: center;
    color: rgba(255,255,255,0.6); font-size: 0.85rem;
}

/* ==================================================
   RESPONSIVE - TABLET (max-width: 1024px)
   ================================================== */
@media (max-width: 1024px) {
    .hero-section { gap: 2rem; }
    .hero-title { font-size: 2.3rem; }
    .hero-image { height: 350px; }
    .section-title { font-size: 2rem; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-sidebar .card { position: static; }
    .carousel { aspect-ratio: 16/9; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
}

/* ==================================================
   RESPONSIVE - MOBILE (max-width: 768px)
   ================================================== */
@media (max-width: 768px) {
    /* Container */
    .container { padding: 0 1.25rem; }

    /* Header */
    header { padding: 0.75rem 0; }
    nav { padding: 0 1.25rem; }
    .logo-text h1 { font-size: 1.1rem; }
    .logo-text p { font-size: 0.65rem; }
    .logo-icon { width: 40px; height: 40px; }

    /* Hamburger menu */
    .menu-toggle { display: flex; }
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem 1.25rem;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
    }
    .nav-open ul { display: flex; }
    nav ul li { width: 100%; }
    nav ul li a {
        display: block; padding: 0.85rem 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 1.05rem;
    }
    nav ul li:last-child a {
        border-bottom: none;
        text-align: center; margin-top: 0.5rem;
        border-radius: 25px;
    }

    /* Main */
    main { margin-top: 70px; min-height: calc(100vh - 70px); }

    /* Sections */
    .section { padding: 2.5rem 0; }
    .section-title { font-size: 1.6rem; }
    .section-header { margin-bottom: 2rem; }

    /* Hero */
    .hero-section {
        grid-template-columns: 1fr;
        gap: 2rem; padding: 2rem 0;
        text-align: center;
    }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-buttons { justify-content: center; }
    .hero-image { height: 250px; }

    /* Stats */
    .stats-section { padding: 2rem 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .stat { padding: 1.25rem 0.75rem; }
    .stat-number { font-size: 2rem; }

    /* Grids */
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

    /* Cards */
    .card:hover { transform: none; }
    .card-content { padding: 1.25rem; }
    .card-content h3 { font-size: 1.15rem; }

    /* Carousel */
    .carousel { aspect-ratio: 16/9; border-radius: 10px; }
    .carousel-arrow { width: 36px; height: 36px; font-size: 1.1rem; }
    .carousel-arrow.prev { left: 8px; }
    .carousel-arrow.next { right: 8px; }

    /* Detail */
    .detail-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .detail-title { font-size: 1.5rem; }
    .detail-description { font-size: 1rem; }
    .detail-sidebar .card { position: static; }
    .detail-price { font-size: 1.5rem; }

    /* Forms */
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-box { padding: 1.5rem; }

    /* Buttons */
    .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
    .btn-lg { padding: 0.85rem 2rem; font-size: 0.95rem; }
    .filter-buttons .btn { padding: 0.5rem 1rem; font-size: 0.85rem; }

    /* Contact */
    .contact-info { padding-top: 0; }
    .contact-info h3 { font-size: 1.3rem; }

    /* About */
    .about-content h3 { font-size: 1.2rem; }
    .about-content p { font-size: 1rem; }

    /* Admin table responsive */
    .admin-table { font-size: 0.85rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin-table th, .admin-table td { padding: 0.75rem 0.5rem; white-space: nowrap; }
    .admin-nav { gap: 0.5rem; }
    .admin-nav .btn { padding: 0.5rem 1rem; font-size: 0.8rem; }

    /* Footer */
    footer { padding: 3rem 0 1.5rem; margin-top: 2rem; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }

    /* Flash messages */
    .flash-messages-container { top: 75px; right: 0.75rem; left: 0.75rem; }
    .flash-message { min-width: auto; font-size: 0.9rem; padding: 0.85rem 1rem; }

    /* Confirmation */
    .confirmation-icon { font-size: 3rem; }
    .confirmation-container h2 { font-size: 1.4rem; }
}

/* ==================================================
   RESPONSIVE - SMALL MOBILE (max-width: 480px)
   ================================================== */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero-title { font-size: 1.65rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; }
    .hero-image { height: 200px; }
    .section-title { font-size: 1.4rem; }
    .stats-grid { gap: 0.75rem; }
    .stat { padding: 1rem 0.5rem; }
    .stat-number { font-size: 1.6rem; }
    .stat > div:last-child { font-size: 0.85rem; }
    .carousel { aspect-ratio: 4/3; border-radius: 8px; }
    .detail-title { font-size: 1.3rem; }
    .filter-buttons { gap: 0.5rem; }
    .filter-buttons .btn { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
}
