/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    /* Add padding to the top to offset the fixed navbar */
    padding-top: 56px; 
}

/* --- Helper Classes --- */
.text-primary {
    color: #007bff !important;
}

hr {
    width: 100px;
    border-top: 3px solid #8D1616; /* Changed to red theme */
    opacity: 1;
}

/* --- Enhanced Modern Navbar --- */
.navbar {
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.95), rgba(27, 40, 56, 0.95)) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.98), rgba(27, 40, 56, 0.98)) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-brand img {
    width: auto;
    max-width: 100%;
    height: auto;
}

.navbar-brand::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8D1616, #28a745);
    transition: width 0.3s ease;
}

.navbar-brand:hover::before {
    width: 100%;
}

.navbar-brand:hover {
    text-shadow: 0 4px 8px rgba(141, 22, 22, 0.3);
}

.navbar-nav {
    gap: 0.15rem;
}

.nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.4rem 0.7rem !important;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    white-space: nowrap;        /* Prevents text wrapping */
    display: flex;              /* Enables flexbox layout */
    align-items: center;        /* Vertically centers icon and text */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0.7rem; /* Start from left padding */
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8D1616, #007bff);
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    width: var(--text-width, calc(100% - 1.4rem)); /* Use JS-calculated width, fallback to original */
}

.nav-link:hover {
    color: #ffffff !important;
}

.nav-link.active {
    color: #ffffff !important;
}

.nav-link.active::after {
    width: var(--text-width, calc(100% - 1.4rem)); /* Use JS-calculated width, fallback to original */
}

.nav-link.active:hover {
    color: #ffffff !important;
}

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.navbar-toggler:focus {
    box-shadow: 0 0 15px rgba(141, 22, 22, 0.5);
}

.navbar-toggler-icon {
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

/* --- Enhanced Register Button in Navbar --- */
.register-nav-btn {
    background: linear-gradient(135deg, #ff6b35, #ff8c42) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 15px !important;
    padding: 0.35rem 0.8rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease !important;
    font-size: 0.8rem;
}

.register-nav-btn:hover {
    background: linear-gradient(135deg, #ff8c42, #ffa366) !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6);
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.register-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.register-nav-btn:hover::before {
    left: 100%;
}

.register-nav-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 25px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    animation: shimmer 3s infinite;
}

.register-nav-btn .register-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #28a745;
    color: white;
    font-size: 0.5rem;
    font-weight: 600;
    padding: 0.05rem 0.25rem;
    border-radius: 6px;
    animation: badgePulse 2s infinite;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1;
}

/* Pulse Animation for Register Button */
.register-nav-btn.pulse-animation {
    animation: registerPulse 3s infinite, breathe 4s ease-in-out infinite;
}

@keyframes registerPulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 53, 0.8), 0 0 0 8px rgba(255, 107, 53, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    }
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Additional eye-catching effects for register button */
.register-nav-btn {
    position: relative;
}

/* Bouncing effect on page load */
.register-nav-btn {
    animation: registerBounce 2s ease-out 1s;
}

@keyframes registerBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Glow intensity variation */
.register-nav-btn:hover {
    animation: glowIntensity 1s ease-in-out infinite alternate;
}

@keyframes glowIntensity {
    0% {
        filter: brightness(1) saturate(1);
    }
    100% {
        filter: brightness(1.1) saturate(1.2);
    }
}

/* Shimmer effect */
@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) rotate(45deg);
        opacity: 0;
    }
}

/* Glow effect on hover */
.register-nav-btn:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Mobile responsive adjustments */
@media (max-width: 991.98px) {
    /* Logo sizing for tablets and mobile */
    .navbar-brand {
        font-size: 1.3rem !important;
    }
    
    .register-nav-btn {
        margin-top: 0.5rem;
        text-align: center;
        width: 100%;
    }
    
    .register-nav-btn .register-badge {
        top: -5px;
        right: 10px;
    }
    
    /* Fix nav link underlines for mobile */
    .nav-link:hover::after,
    .nav-link.active::after {
        width: var(--text-width, 23%); /* Use JS-calculated width, fallback to 23% */
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem !important;
    }
}

/* Very small mobile devices */
@media (max-width: 373px) {
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    .navbar-brand img {
        height: 46px !important;
        width: auto !important;
    }
    
    .navbar-toggler {
        padding: 0.5rem !important;
    }
    
    .navbar-toggler-icon {
        width: 1.1rem;
        height: 1.1rem;
    }
    
    .nav-link {
        font-size: 0.8rem !important;
        padding: 0.3rem 0.5rem !important;
    }
    
    .nav-link i {
        font-size: 0.9rem;
        margin-right: 0.25rem !important;
        flex-shrink: 0;
    }
}

@media (max-width: 338px) {
    .navbar-brand {
        font-size: 1rem !important;
    }

    .navbar-brand img {
        height: 42px !important;
        width: auto !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 316px) {
    .navbar-brand {
        font-size: 1rem !important;
    }

    .navbar-brand img {
        height: 39px !important;
        width: auto !important;
    }
}

@media (max-width: 299px) {
    .navbar-brand {
        font-size: 1rem !important;
    }

    .navbar-brand img {
        height: 36px !important;
        width: auto !important;
    }
}

/* Icon animation */
.register-nav-btn i {
    transition: transform 0.3s ease;
}

.register-nav-btn:hover i {
    transform: rotate(360deg);
}

/* --- Sections --- */
section {
    padding: 80px 0;
}
section h2 {
    font-weight: 700;
}

/* --- Fade-in Animation on Scroll --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Enhanced Footer Styling --- */
.enhanced-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    position: relative;
    overflow: hidden;
}

.enhanced-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8D1616, #007bff, #8D1616);
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
}

.social-links {
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8D1616, #007bff);
    color: white !important;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(141, 22, 22, 0.4);
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff, #8D1616);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link:hover::before {
    opacity: 1;
}

.social-link i {
    position: relative;
    z-index: 1;
}

.footer-link {
    position: relative;
    transition: all 0.3s ease;
    padding: 0.2rem 0;
}

.footer-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8D1616, #007bff);
    transition: width 0.3s ease;
}

.footer-link:hover::before {
    width: 100%;
}

.footer-link:hover {
    color: #ffffff !important;
    padding-left: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 5px;
}

.contact-item:hover {
    background: rgba(141, 22, 22, 0.1);
    transform: translateX(5px);
}

.contact-item i {
    transition: all 0.3s ease;
}

.contact-item:hover i {
    transform: scale(1.2);
}

.copyright, .tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.copyright:hover, .tagline:hover {
    opacity: 1;
}

/* Footer Animations */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
