/* General Page Styling */
body {
    background-color: #f8f9fa; /* Light gray background */
    margin: 0; /* Remove default margin for consistent layout */
    /* font now handled by poppins-fonts.css */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure the body spans the full height of the viewport */
    
    /* Background image for desktop */
    background-image: url('../images/background_desktop.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Modern Typography */
h1, h2, h3, h4, h5, h6 {
    /* font-family now handled by poppins-fonts.css */
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Modern Focus States */
*:focus {
    outline: 2px solid rgba(50, 159, 221, 0.5);
    outline-offset: 2px;
}

/* Main content */
.container {
    flex: 1; /* Allow the content to take up all available vertical space */
}

/* Modern Card Styling with Glassmorphism */
.card {
    border-radius: 20px;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 25px 45px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 35px 65px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.card-header {
    background: linear-gradient(135deg, #329fdd 0%, #2a7bb8 100%);
    color: white;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border: none;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.card-header::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;
}

.card-header:hover::before {
    left: 100%;
}

.card-header h4 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

/* Modern Card Body */
.card-body {
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Modern Form Styling */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    color: #2a2b69;
    font-weight: 500;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: #329fdd;
    box-shadow: 
        0 0 0 3px rgba(50, 159, 221, 0.1),
        0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    outline: none;
}

.form-control::placeholder {
    color: rgba(42, 43, 105, 0.6);
    font-weight: 400;
}

/* Modern Input Group */
.input-group-text {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-left: none;
    border-radius: 0 12px 12px 0;
    color: #329fdd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-group-text:hover {
    background: rgba(50, 159, 221, 0.1);
    color: #2a7bb8;
}

.input-group .form-control {
    border-radius: 12px 0 0 12px;
}

/* Modern Button Styling */
.btn-primary {
    background: linear-gradient(135deg, #329fdd 0%, #2a7bb8 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(50, 159, 221, 0.3);
}

.btn-primary::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;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2a7bb8 0%, #1d425a 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(50, 159, 221, 0.4);
}

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

.btn-primary:active {
    transform: translateY(-1px);
}

/* Modern Links */
.card-body a {
    color: #329fdd;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.card-body a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background: linear-gradient(90deg, #329fdd, #2a7bb8);
    transition: all 0.3s ease;
}

.card-body a:hover {
    color: #2a7bb8;
    text-decoration: none;
}

.card-body a:hover::after {
    width: 100%;
    left: 0;
}

/* Modern Logo Styling */
.logo {
    max-width: 100%; /* make logo fully responsive */
    width: auto;
    height: auto;
    max-height: 200px; /* prevent logo from being too tall */
    margin-bottom: 0; /* remove bottom margin since it's now in a card */
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
    object-fit: contain; /* maintain aspect ratio */
}

.logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.15));
}

/* logo card specific styling */
.logo-card {
    background: rgba(255, 255, 255, 0.1) !important; /* very subtle white background */
    backdrop-filter: blur(10px) !important; /* matching version text blur */
    -webkit-backdrop-filter: blur(10px) !important; /* safari support */
    width: 100%; /* ensure full width responsiveness */
    max-width: 100%; /* prevent overflow */
    min-height: auto; /* allow card to adjust to logo size */
    overflow: visible; /* ensure logo is not clipped */
}

.logo-card .card-body {
    padding: 2rem; /* adjust padding for logo card */
    background: transparent !important; /* remove additional background */
    text-align: center; /* ensure logo stays centered */
}

/* Modern Alert Styling */
.alert {
    border: none;
    border-radius: 15px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert .close {
    font-size: 1.5rem;
    font-weight: 300;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.alert .close:hover {
    opacity: 1;
}

/* Modern Version Text */
.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

/* responsive logo and card styles */
@media (max-width: 768px) {
    .logo {
        max-width: 100%; /* fully responsive on tablets */
        max-height: 150px; /* adjust height for tablets */
    }
    
    .logo-card .card-body {
        padding: 1.5rem; /* reduce padding for tablets */
    }
}

@media (max-width: 576px) {
    .logo {
        max-width: 100%; /* fully responsive on mobile */
        max-height: 120px; /* adjust height for mobile */
    }
    
    .logo-card .card-body {
        padding: 1rem; /* reduce padding for mobile */
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 100%; /* fully responsive on small mobile */
        max-height: 100px; /* adjust height for small mobile */
    }
    
    .logo-card .card-body {
        padding: 0.75rem; /* minimal padding for very small screens */
    }
}

/* Modern Footer Styling */
.footer {
    text-align: center;
    padding: 2rem 0;
    background: transparent;
    border-top: none;
    margin-top: auto;
}

.footer-img {
    opacity: 0.6;
    max-width: 300px;
    width: 100%;
    height: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.footer-img:hover {
    opacity: 0.9;
    transform: scale(1.05);
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.15));
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .footer-img {
        max-width: 200px; /* Smaller logo for tablets and mobile */
    }
}

@media (max-width: 576px) {
    .footer-img {
        max-width: 150px; /* Even smaller logo for narrow screens */
    }
}

/* Responsive background image handling */
/* Tablet and smaller desktop screens */
@media (max-width: 1024px) {
    body {
        background-attachment: scroll; /* Better performance on tablets */
        background-size: cover;
    }
}

/* Mobile screens */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
        background-size: cover;
        background-position: center top; /* Focus on top of image for mobile */
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    body {
        background-attachment: scroll;
        background-size: cover;
        background-position: center top;
        /* Ensure background doesn't interfere with content readability */
    }
    
    /* Remove grey background overlay for cleaner mobile appearance */
    .container {
        background-color: transparent;
        border-radius: 0;
        padding: 20px;
        margin: 10px;
    }
}