/* Custom styles for Celaya Sport Club */
body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    scroll-behavior: smooth;
}

/* Loading Animation Styles */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #FF0000; /* Red background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 4s ease-out; /* Increased for slower fade-out */
}

.loader-container.hidden {
    opacity: 0;
    pointer-events: none; /* Disable interactions when hidden */
}

.loader-background {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2), transparent);
    animation: pulse-bg 3s ease-in-out infinite; /* Slower background pulse */
}

@keyframes pulse-bg {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.loader-cube {
    width: 80px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-cube 4s linear infinite; /* Slower cube rotation */
}

.loader-cube div {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid #FFD700; /* Gold border */
    background: rgba(255, 0, 0, 0.3); /* Semi-transparent red */
    opacity: 0.8;
}

.loader-cube .front  { transform: translateZ(40px); }
.loader-cube .back   { transform: translateZ(-40px); }
.loader-cube .right  { transform: rotateY(90deg) translateZ(40px); }
.loader-cube .left   { transform: rotateY(-90deg) translateZ(40px); }
.loader-cube .top    { transform: rotateX(90deg) translateZ(40px); }
.loader-cube .bottom { transform: rotateX(-90deg) translateZ(40px); }

@keyframes rotate-cube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.loader-text {
    color: #FFFFFF; /* White font */
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    overflow: hidden; /* For typing animation */
    white-space: nowrap;
    animation: typing 3.5s steps(20, end) infinite, blink-caret 0.5s step-end infinite; /* Slower typing */
}

@keyframes typing {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
}

@keyframes blink-caret {
    50% { border-right: 2px solid #FFFFFF; }
}

.navbar {
    background-image: url('navbar.png');
    background-size: cover;
    background-position: center;
    transition: background-color 0.3s;
}

.navbar .nav-link {
    color: #FFFFFF;
    font-weight: 500;
    margin: 0 10px;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #FFD700;
}

.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

@media (max-width: 768px) {
    .hero-video {
        display: none;
    }
    .hero {
        background: url('assets/csc25-poster.jpg') no-repeat center center/cover;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    border: 2px solid #FF0000;
    padding: 10px;
    display: inline-block;
}

.hero .logo-large {
    max-width: 400px; /* Large size for branding */
    margin-bottom: 10px;
}

.hero p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

section {
    padding: 60px 0;
}

#about h2 {
    font-family: 'Montserrat', sans-serif;
    color: #FF0000;
    text-align: center;
    margin-top: 20px; /* Lower the title to accommodate the logo above */
}

#about .logo-medium {
    max-width: 300px; /* 3 times bigger than 80px */
    max-height: 300px; /* 3 times bigger than 80px */
    margin: 0 auto 30px auto; /* Center the logo above the title */
    display: block; /* Ensure it behaves as a block element */
    object-fit: contain; /* Maintain aspect ratio */
}

.card {
    transition: transform 0.3s;
    border: 2px solid #FFD700;
    border-radius: 10px;
    overflow: hidden;
}

.card:hover {
    transform: scale(1.05);
}

.event-card, .workshop-card {
    background-color: #f8f9fa;
}

.event-poster {
    width: 100%;
    height: 150px; /* Smaller for mini posters */
    object-fit: cover;
}

@media (max-width: 576px) {
    .event-poster {
        height: 200px;
    }
    .event-card .card-body,
    .workshop-card .card-body {
        padding: 15px;
    }
    .event-card .card-title,
    .workshop-card .card-title {
        font-size: 1.1rem;
    }
    .event-card .card-text,
    .workshop-card .card-text {
        font-size: 0.9rem;
    }
    .event-card .btn,
    .workshop-card .btn {
        width: 100%;
        font-size: 0.9rem;
    }
}

#modalPoster {
    max-height: 60vh;
    width: auto;
    max-width: 100%;
}

.btn-warning {
    background-color: #FFD700;
    border-color: #FFD700;
    color: #333;
}

.btn-warning:hover {
    background-color: #FFC107;
    border-color: #FFC107;
}

.btn-danger {
    background-color: #FF0000;
    border-color: #FF0000;
}

.btn-danger:hover {
    background-color: #CC0000;
    border-color: #CC0000;
}

footer {
    border-top: 2px solid #FFD700;
}

#contact .logo-medium {
    max-width: 240px; /* 3 times bigger than 80px */
    max-height: 240px; /* 3 times bigger than 80px */
    display: block;
    margin: 20px auto 0;
    height: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensure the image fits without distortion */
}

/* Form validation styles */
.form-control:invalid:focus {
    border-color: #FF0000;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}