/* Enhanced Login Page Styles - Rutero Model School */

/* CSS Variables - Blue and Ash Color Palette */
:root {
    /* Primary Blue Palette */
    --primary-blue: #87CEEB;
    --primary-blue-dark: #4682B4;
    --primary-blue-light: #B0E0E6;
    --primary-blue-alpha: rgba(135, 206, 235, 0.1);
    --primary-blue-alpha-strong: rgba(135, 206, 235, 0.2);
    
    /* Ash/Gray Palette */
    --ash-light: #F8F9FA;
    --ash-medium: #E9ECEF;
    --ash-dark: #6C757D;
    --ash-darker: #495057;
    
    /* Text Colors */
    --text-primary: #2C3E50;
    --text-secondary: #5A6C7D;
    --text-light: #8B9DC3;
    --text-white: #FFFFFF;
    --text-muted: #95A5A6;
    
    /* Background Colors */
    --bg-white: #FFFFFF;
    --bg-light: #FAFBFC;
    --bg-gradient: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    
    /* Shadows and Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-colored: 0 8px 25px rgba(135, 206, 235, 0.3);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    --gradient-admin: linear-gradient(135deg, #4682B4 0%, #2E5984 100%);
    --gradient-parent: linear-gradient(135deg, #87CEEB 0%, #5DADE2 100%);
    
    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 50px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Shapes and Animation */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-blue-alpha);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: 7s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: -75px;
    animation-delay: 14s;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
    animation: floatUp 15s infinite linear;
    opacity: 0.6;
}

.floating-element:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    left: 50%;
    animation-delay: 5s;
}

.floating-element:nth-child(3) {
    left: 80%;
    animation-delay: 10s;
}

/* Header Styles */
.login-header {
    padding: 2rem 0 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ash-medium);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.header-logo {
    width: 60px;
    height: auto;
    object-fit: contain;
}

.school-info {
    text-align: left;
}

.school-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.school-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: calc(100vh - 200px);
}

.login-container {
    max-width: 500px;
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 3rem 2.5rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.login-container.loaded {
    opacity: 1;
    transform: translateY(0);
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-colored);
}

.welcome-icon i {
    font-size: 2rem;
    color: var(--text-white);
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Login Options */
.login-options {
    margin-bottom: 2rem;
}

.login-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--bg-white);
    border: 2px solid var(--ash-medium);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.login-option:last-child {
    margin-bottom: 0;
}

.login-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-blue-alpha);
    transition: var(--transition-smooth);
    z-index: 0;
}

.login-option:hover::before {
    left: 0;
}

.login-option:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.login-option > * {
    position: relative;
    z-index: 1;
}

.option-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-white);
    flex-shrink: 0;
}

.admin-login .option-icon {
    background: var(--gradient-admin);
}

.parent-login .option-icon {
    background: var(--gradient-parent);
}

.option-content {
    flex: 1;
}

.option-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.option-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.option-arrow {
    font-size: 1.2rem;
    color: var(--text-light);
    transition: var(--transition-smooth);
}

.login-option:hover .option-arrow {
    color: var(--primary-blue);
    transform: translateX(5px);
}

/* Additional Options */
.additional-options {
    margin-bottom: 2rem;
}

.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0 1.5rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--ash-medium);
}

.divider-text {
    background: var(--bg-white);
    padding: 0 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.help-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.help-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--ash-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.help-link:hover {
    background: var(--primary-blue-alpha);
    color: var(--primary-blue-dark);
    transform: translateY(-2px);
}

.help-link i {
    font-size: 1rem;
}

/* Back Section */
.back-section {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ash-light);
}

.back-home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--primary-blue);
    border-radius: var(--radius-full);
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.back-home-link:hover {
    background: var(--primary-blue);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.back-home-link i {
    font-size: 0.9rem;
}

/* Footer */
.login-footer {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--ash-medium);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
    }
    66% {
        transform: translateY(30px) rotate(240deg);
    }
}

@keyframes floatUp {
    0% {
        bottom: -10px;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        bottom: 100vh;
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-header {
        padding: 1.5rem 0 1rem;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .school-info {
        text-align: center;
    }
    
    .school-name {
        font-size: 1.5rem;
    }
    
    .login-main {
        padding: 1.5rem 1rem;
        min-height: calc(100vh - 180px);
    }
    
    .login-container {
        padding: 2.5rem 2rem;
    }
    
    .welcome-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }
    
    .welcome-icon i {
        font-size: 1.8rem;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
    
    .login-option {
        padding: 1.25rem;
        gap: 0.75rem;
    }
    
    .option-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .option-title {
        font-size: 1.1rem;
    }
    
    .option-description {
        font-size: 0.85rem;
    }
    
    .help-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .help-link {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-logo {
        width: 50px;
    }
    
    .school-name {
        font-size: 1.3rem;
    }
    
    .school-tagline {
        font-size: 0.8rem;
    }
    
    .login-container {
        padding: 2rem 1.5rem;
        margin: 0 0.5rem;
    }
    
    .welcome-title {
        font-size: 1.6rem;
    }
    
    .welcome-subtitle {
        font-size: 0.9rem;
    }
    
    .login-option {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .option-content {
        text-align: center;
    }
    
    .option-arrow {
        display: none;
    }
    
    .shape-1,
    .shape-2,
    .shape-3 {
        display: none;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.login-option:focus,
.help-link:focus,
.back-home-link:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #0066CC;
        --primary-blue-dark: #004499;
        --text-primary: #000000;
        --text-secondary: #333333;
    }
}

/* Print Styles */
@media print {
    .background-shapes,
    .floating-elements {
        display: none;
    }
    
    .login-container {
        box-shadow: none;
        border: 2px solid #000;
    }
}