/* Custom CSS for PHF Registration Portal */

/* Root Variables */
:root {
    --phf-green: #007800;
    --phf-light-green: #e8f5e8;
    --phf-dark-blue: #1a365d;
    --phf-gray: #6c757d;
    --phf-light-gray: #f8f9fa;
    --phf-white: #ffffff;
    --phf-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --phf-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --phf-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--phf-white);
    overflow-x: hidden;
}

/* Navigation Styles */
.navbar {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.navbar-logo {
    height: 80px;
    width: auto;
}

.login-btn {
    background: var(--phf-green);
    border: none;
    color: white;
    font-weight: 500;
    transition: var(--phf-transition);
    box-shadow: var(--phf-shadow);
}

.login-btn:hover {
    background: #005600;
    transform: translateY(-2px);
    box-shadow: var(--phf-shadow-hover);
    color: white;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

/* Logo Styles */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phf-logo-img {
    width: 380px;
    height: 380px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--phf-shadow);
    animation: logoFloat 3s ease-in-out infinite;
    transition: var(--phf-transition);
}

.phf-logo-img:hover {
    transform: scale(1.05);
    box-shadow: var(--phf-shadow-hover);
}

/* Typography */
.display-4 {
    color: #000000;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Instruction Box */
.instruction-box {
    background: var(--phf-light-gray);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--phf-green);
    box-shadow: var(--phf-shadow);
}

/* Registration Cards */
.registration-card {
    background: var(--phf-light-green);
    border: none;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--phf-transition);
    box-shadow: var(--phf-shadow);
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.registration-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.registration-card:hover::before {
    left: 100%;
}

.registration-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--phf-shadow-hover);
    background: var(--phf-green);
    color: white;
}

.registration-card:hover .card-icon i {
    color: white;
    transform: scale(1.1);
}

.registration-card:hover .card-title {
    color: white;
}

.registration-card:hover .card-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.card-icon {
    margin-bottom: 1rem;
}

.card-icon i {
    font-size: 2.5rem;
    color: var(--phf-gray);
    transition: var(--phf-transition);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--phf-gray);
    margin-bottom: 0.5rem;
    transition: var(--phf-transition);
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--phf-gray);
    opacity: 0.8;
    transition: var(--phf-transition);
}

/* Footer */
.footer {
    background: var(--phf-light-gray);
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 3rem;
}

.footer-logo {
    height: 24px;
    width: auto;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* Animations */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out 0.2s both;
}

.animate-card {
    animation: cardSlideIn 0.6s ease-out both;
}

.animate-card:nth-child(1) { animation-delay: 0.1s; }
.animate-card:nth-child(2) { animation-delay: 0.2s; }
.animate-card:nth-child(3) { animation-delay: 0.3s; }
.animate-card:nth-child(4) { animation-delay: 0.4s; }
.animate-card:nth-child(5) { animation-delay: 0.5s; }
.animate-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 2rem 0;
    }
    
    .phf-logo-img {
        width: 300px;
        height: 300px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .instruction-box {
        padding: 1.5rem;
    }
    
    .registration-card {
        padding: 1.5rem 1rem;
        min-height: 160px;
    }
    
    .card-icon i {
        font-size: 2rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .login-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .phf-logo-img {
        width: 200px;
        height: 200px;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .instruction-box {
        padding: 1rem;
    }
    
    .registration-card {
        padding: 1.25rem 0.75rem;
        min-height: 140px;
    }
    
    .card-icon i {
        font-size: 1.75rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-subtitle {
        font-size: 0.8rem;
    }
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
.registration-card:focus {
    outline: 3px solid var(--phf-green);
    outline-offset: 2px;
}

.login-btn:focus {
    outline: 3px solid var(--phf-green);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .registration-card {
        border: 2px solid var(--phf-green);
    }
    
    .registration-card:hover {
        border-color: var(--phf-dark-blue);
    }
}

/* Video Popup Styles */
.video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.5s ease-out;
}

.video-popup-content {
    width: 90%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.video-popup-content .ratio {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#skipButton {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#skipButton:hover {
    background: white;
    color: black;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
