/* 
 * Outreach and Extension Service - Login Page Styles
 * Extracted from index.php for better organization and CSP compliance
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body, html {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    background: linear-gradient(135deg, #2C3E50 0%, #667eea 50%, #764ba2 100%);
}

.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* Background Slideshow Container */
.background-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    z-index: 1;
    filter: brightness(0.8) contrast(1.1);
}

.background-image.active {
    opacity: 0.4;
    filter: brightness(0.8) contrast(1.1) saturate(1.2);
}

/* Optional: Add a subtle overlay for better text readability */
.background-slideshow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.content-wrapper {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    width: 100%;
    animation: fadeInScale 1s ease-out;
}

.logo-section {
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.main-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    animation: pulse 2s infinite;
}

.main-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.title-section {
    margin-bottom: 50px;
}

.title-section:first-child {
    margin-top: 20px;
    margin-bottom: 30px;
}

/* Box Reveal Animation Styles */
.box-reveal-container {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.box-reveal-text {
    opacity: 0;
    transform: translateY(75px);
    transition: all 0.5s ease-out 0.25s;
}

.box-reveal-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.box-reveal-slide {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    right: 0;
    z-index: 20;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease-in;
}

.box-reveal-slide.visible {
    transform: translateX(100%);
}

.main-title {
    font-size: 3.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: 1px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.6rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

.description {
    font-size: 1.1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.login-section {
    animation: fadeInUp 1s ease-out 0.7s both;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    height: 60px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #4a90e2 100%);
    border: 3px solid rgba(255, 215, 0, 0.8);
    outline: none;
    border-radius: 50px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3), 0 15px 40px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-size: 18px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: buttonGlow 2s ease-in-out infinite alternate;
}

.google-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.google-btn:hover::before {
    left: 100%;
}

.google-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 50%, #5ba0f2 100%);
    border-color: rgba(255, 215, 0, 1);
}

.google-btn:active {
    transform: translateY(-1px);
}

.google-btn img {
    height: 28px;
    filter: none;
    background: white;
    border-radius: 4px;
    padding: 2px;
}

@keyframes buttonGlow {
    0% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3), 0 15px 40px rgba(0, 0, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), 0 15px 40px rgba(0, 0, 0, 0.3);
    }
}

.error-msg {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-size: 14px;
    border-left: 4px solid #ef4444;
    animation: shake 0.5s ease-in-out;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Barangay images floating animation */
.barangay-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.barangay-image {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 215, 0, 0.6);
    animation: float 12s ease-in-out infinite;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.barangay-image:hover {
    transform: scale(1.1);
    border-color: rgba(255, 215, 0, 1);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.4), 0 0 30px rgba(255, 215, 0, 0.3);
}

.barangay-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.barangay-image:nth-child(1) {
    top: 8%;
    left: 5%;
    animation-delay: 0s;
    width: 90px;
    height: 90px;
}

.barangay-image:nth-child(2) {
    top: 20%;
    right: 8%;
    animation-delay: 2s;
    width: 85px;
    height: 85px;
}

.barangay-image:nth-child(3) {
    top: 40%;
    left: 3%;
    animation-delay: 4s;
    width: 75px;
    height: 75px;
}

.barangay-image:nth-child(4) {
    top: 55%;
    right: 12%;
    animation-delay: 6s;
    width: 80px;
    height: 80px;
}

.barangay-image:nth-child(5) {
    top: 70%;
    left: 10%;
    animation-delay: 8s;
    width: 85px;
    height: 85px;
}

.barangay-image:nth-child(6) {
    bottom: 12%;
    right: 5%;
    animation-delay: 10s;
    width: 70px;
    height: 70px;
}

/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-25px) rotate(3deg);
    }
    50% {
        transform: translateY(15px) rotate(-2deg);
    }
    75% {
        transform: translateY(-15px) rotate(1deg);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
    
    .description {
        font-size: 1rem;
    }
    
    .box-reveal-text {
        transform: translateY(50px);
    }
    
    .main-logo {
        width: 100px;
        height: 100px;
    }
    
    .main-logo img {
        width: 70px;
        height: 70px;
    }
    
    .google-btn {
        height: 55px;
        font-size: 16px;
    }

    .barangay-image {
        width: 60px;
        height: 60px;
    }

    .barangay-image:nth-child(1) {
        width: 65px;
        height: 65px;
    }

    .barangay-image:nth-child(2) {
        width: 60px;
        height: 60px;
    }

    .barangay-image:nth-child(3) {
        width: 55px;
        height: 55px;
    }

    .barangay-image:nth-child(4) {
        width: 60px;
        height: 60px;
    }

    .barangay-image:nth-child(5) {
        width: 65px;
        height: 65px;
    }

    .barangay-image:nth-child(6) {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .description {
        font-size: 0.9rem;
    }
    
    .content-wrapper {
        padding: 0 15px;
    }

    .barangay-image {
        width: 50px;
        height: 50px;
    }

    .barangay-image:nth-child(1),
    .barangay-image:nth-child(2),
    .barangay-image:nth-child(3),
    .barangay-image:nth-child(4),
    .barangay-image:nth-child(5),
    .barangay-image:nth-child(6) {
        width: 50px;
        height: 50px;
    }
}
