/*
 * ============================================================
 *  FRONTEND / PUBLIC PAGES — UNIFIED STYLESHEET
 *  front_style.css
 *
 *  Covers: login page, parent login page, landing / hero page
 *
 *  Requires PHP inline :root block in <head>:
 *  <style>
 *    :root {
 *      --primary:      <?php echo $themePrimary; ?>;
 *      --primary-dark: <?php echo $themeDark; ?>;
 *      --primary-rgb:  <?php echo $themeRgb; ?>;
 *      --secondary:    <?php echo $themeSecondary; ?>;
 *    }
 *  </style>
 *
 *  Sections:
 *    1. Design tokens
 *    2. Base / body
 *    3. Login page (standalone card)
 *    4. Landing / hero page
 *    5. Shared components
 *    6. Animations
 * ============================================================ */


/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
    --primary:       #8b1538;
    --primary-dark:  #5d0e28;
    --primary-rgb:   139, 21, 56;
    --secondary:     #ffd700;

    --primary-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --cta-gradient:     linear-gradient(45deg,   var(--primary),   var(--secondary));
}


/* ============================================================
   2. BASE / BODY
   ============================================================ */
body {
    background: var(--primary-gradient);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


/* ============================================================
   3. LOGIN PAGE (standalone card)
   ============================================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 450px;
    width: 100%;
}

/* Landing page variant — no max-width constraint */
.login-card.card-hero {
    max-width: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.login-header {
    background: var(--primary-gradient);
    color: white;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    text-align: center;
}

.login-body { padding: 2rem; }


/* ============================================================
   4. LANDING / HERO PAGE
   ============================================================ */
.hero-section {
    padding: 60px 0;
    color: white;
}

.logo-text {
    font-size: 3.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

/* Glassmorphism stat cards on the hero */
.stats-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}


/* ============================================================
   5. SHARED COMPONENTS
   ============================================================ */

/* ── Form controls ── */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
    outline: none;
}

.input-group-text {
    border-radius: 0 10px 10px 0;
    border: 2px solid #e9ecef;
    border-left: none;
    background: transparent;
}

.form-check-input:checked {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

/* ── Login / CTA button ── */
.btn-login {
    background: var(--cta-gradient);
    border: none;
    border-radius: 10px;
    padding: 14px 30px;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
    color: white;
}

.btn-login:disabled {
    opacity: 0.7;
    transform: none;
}

/* Landing page button — slightly less padding */
.btn-login.btn-hero {
    padding: 12px 30px;
    font-size: 1rem;
}

/* ── Alerts ── */
.alert {
    border-radius: 10px;
    border: none;
    margin-bottom: 1.5rem;
}

/* ── Back link (shown above login card) ── */
.back-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: white;
    text-decoration: underline;
}


/* ============================================================
   6. ANIMATIONS
   ============================================================ */

/* Floating background shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) { top: 10%;    left: 10%;  animation-delay: 0s; }
.shape:nth-child(2) { top: 20%;    right: 10%; animation-delay: 2s; }
.shape:nth-child(3) { bottom: 10%; left: 20%;  animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0px)   rotate(0deg);  }
    50%       { transform: translateY(-20px) rotate(10deg); }
}