/**
 * HRSO - Public Website Styles
 * Custom CSS for public-facing pages
 */

/* ========================================
   ROOT VARIABLES
======================================== */
:root {
    /* Colors */
    --primary-orange: #FF5901;
    --primary-orange-dark: #E04D00;
    --primary-blue: #0170B9;
    --primary-blue-dark: #015A92;
    --primary-purple: #6366F1;
    --primary-indigo: #4F46E5;
    
    /* Gradients */
    --gradient-orange: linear-gradient(135deg, #FF5901 0%, #FF7A33 100%);
    --gradient-blue: linear-gradient(135deg, #0170B9 0%, #4299E1 100%);
    --gradient-purple: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --gradient-hero: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 50%, #7C3AED 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 200ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 5rem;
}

/* ========================================
   GLOBAL STYLES
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #F5F5F5;
    overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: #1a202c;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: #4a5568;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* ========================================
   UTILITY CLASSES
======================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 9999px;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-orange);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-orange);
}

/* ========================================
   NAVBAR STYLES
======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
    background: white;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.navbar-logo img {
    height: 60px;
    width: auto;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.navbar-menu a {
    font-weight: 600;
    color: #333;
    transition: var(--transition-fast);
    position: relative;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-orange);
    transition: var(--transition-fast);
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--primary-orange);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
    width: 100%;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0.5rem;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-orange);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* ========================================
   HERO SECTION
======================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========================================
   SECTION STYLES
======================================== */
.section {
    padding: var(--section-padding) 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-divider {
    width: 6rem;
    height: 4px;
    background: var(--gradient-orange);
    margin: 0 auto 3rem;
    border-radius: 2px;
}

/* ========================================
   CARD STYLES
======================================== */
.card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-2xl);
}

.card-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a202c;
}

.card-text {
    color: #718096;
    line-height: 1.8;
}

/* ========================================
   STATS STYLES
======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* ========================================
   FORM STYLES
======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: var(--transition-fast);
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 89, 1, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   FOOTER STYLES
======================================== */
.footer {
    background: #1a202c;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #cbd5e0;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-orange);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: #cbd5e0;
}

/* ========================================
   GALLERY STYLES
======================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.8s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease-out;
}

/* ========================================
   RESPONSIVE STYLES
======================================== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 4rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 3rem;
    }
    
    .navbar-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-xl);
        transition: var(--transition-normal);
    }
    
    .navbar-menu.active {
        left: 0;
    }
    
    .navbar-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    :root {
        --section-padding: 2rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .navbar,
    .footer,
    .btn {
        display: none;
    }
}

/* ========================================
   ACCESSIBILITY
======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus-visible {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* ========================================
   CUSTOM SCROLLBAR
======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-orange-dark);
}

/* ========================================
   LOADING SPINNER
======================================== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 89, 1, 0.2);
    border-top-color: var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   BACK TO TOP BUTTON
======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    z-index: 999;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    background: var(--primary-orange-dark);
    transform: translateY(-5px);
}

/* ========================================
   ALERT STYLES
======================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
}

.alert-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}
