/* Firayalal Public School Admission System Styles */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1e3a8a; /* Dark blue from logo */
    --secondary-color: #D4AF37; /* Golden yellow from navigation */
    --accent-color: #dc2626; /* Red accent from building */
    --success-color: #059669; /* Green for success states */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
}

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Header Styles */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.school-logo {
    position: relative;
}

.school-logo-img {
    height: 60px;
    width: auto;
    max-width: 400px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.footer-logo-img:hover {
    opacity: 1;
}

.contact-info {
    font-size: 0.9rem;
}

/* Header Enhancement */
header {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    border-bottom: none;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

/* Form Styles */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.25);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--accent-color);
}

.invalid-feedback {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #047857;
    border-color: #047857;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
    background-color: #6b7280;
    border-color: #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563;
    border-color: #4b5563;
    transform: translateY(-2px);
}

/* Progress Bar */
.progress {
    border-radius: 10px;
    background-color: #e5e7eb;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-info {
    background-color: #dbeafe;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.alert-warning {
    background-color: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}

/* Class XI Form Styles */
#classXIForm .card {
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

#classXIForm .card:hover {
    border-color: var(--success-color);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.1);
}

#classXIForm .card-header {
    background-color: var(--bg-light);
    border-bottom: 2px solid #e5e7eb;
}

.form-check-input:checked {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

/* Signature Upload */
#signature_upload {
    border: 2px dashed #d1d5db;
    background-color: #f9fafb;
    transition: all 0.3s ease;
}

#signature_upload:hover {
    border-color: var(--success-color);
    background-color: #f0fdf4;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }
    
    .school-logo-img {
        height: 50px;
        max-width: 300px;
    }
    
    .contact-info {
        font-size: 0.8rem;
    }
    
    .card-body {
        padding: 1.75rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* Header Responsive - More Compact */
    header {
        padding: 0.5rem 0 !important;
    }
    
    .school-logo-img {
        height: 40px;
        max-width: 220px;
    }
    
    .footer-logo-img {
        height: 40px;
        max-width: 160px;
    }
    
    .contact-info {
        font-size: 0.75rem;
    }
    
    .contact-info div {
        margin-bottom: 0.2rem;
    }
    
    /* Header text adjustments */
    header h4 {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    
    header small {
        font-size: 0.7rem;
    }
    
    /* Form adjustments */
    .card-body {
        padding: 1.5rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.65rem 0.85rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    /* Progress bar */
    .progress {
        height: 6px;
    }
    
    /* Alert adjustments */
    .alert {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .alert h6 {
        font-size: 0.9rem;
    }
}

/* Mobile Devices */
@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    /* Mobile Header - Horizontal Layout */
    header {
        padding: 0.5rem 0 !important;
    }
    
    .school-logo-img {
        height: 35px;
        max-width: 120px;
    }
    
    .footer-logo-img {
        height: 35px;
        max-width: 120px;
    }
    
    /* Mobile Title Styling */
    .mobile-title {
        font-size: 0.9rem;
        font-weight: 600;
        line-height: 1.1;
    }
    
    .mobile-subtitle {
        font-size: 0.65rem;
        opacity: 0.9;
        line-height: 1;
    }
    
    /* Mobile Contact Icons */
    .mobile-contact {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .mobile-phone,
    .mobile-email {
        font-size: 0.8rem;
        opacity: 0.9;
    }
    
    .footer-contact {
        font-size: 0.65rem;
    }
    
    /* Footer text mobile */
    footer h6 {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }
    
    footer .small {
        font-size: 0.65rem;
    }
    
    /* Main content mobile - More compact */
    .container.my-5 {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Cards mobile */
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-header h4 {
        font-size: 1.1rem;
    }
    
    /* Form elements mobile */
    .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    
    .form-text {
        font-size: 0.75rem;
    }
    
    .invalid-feedback {
        font-size: 0.75rem;
    }
    
    /* Buttons mobile */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Navigation buttons mobile */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .d-flex.justify-content-between .btn {
        width: 100%;
        margin-bottom: 0;
    }
    
    /* Progress bar mobile */
    .progress {
        height: 5px;
    }
    
    .progress-bar {
        border-radius: 5px;
    }
    
    /* Step indicator mobile */
    .badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* Alerts mobile */
    .alert {
        padding: 0.6rem;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    
    .alert h6 {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .alert ul {
        padding-left: 1rem;
    }
    
    .alert li {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    
    /* Form steps mobile */
    .form-step h5 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Category checkboxes mobile */
    .form-check {
        margin-bottom: 0.5rem;
    }
    
    .form-check-label {
        font-size: 0.8rem;
    }
    
    /* Class XI form mobile */
    #classXIForm .card-header h6 {
        font-size: 0.85rem;
    }
    
    #classXIForm .card-body {
        padding: 0.75rem;
    }
    
    /* Footer mobile */
    footer {
        padding: 1rem 0 !important;
    }
    
    footer h6 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    footer p {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    
    footer .text-end {
        text-align: left !important;
        margin-top: 0.5rem;
    }
}

/* Extra Small Devices */
@media (max-width: 400px) {
    .container {
        padding: 0 8px;
    }
    
    /* Ultra Compact Mobile Header */
    header {
        padding: 0.4rem 0 !important;
    }
    
    .school-logo-img {
        height: 30px;
        max-width: 100px;
    }
    
    .footer-logo-img {
        height: 30px;
        max-width: 100px;
    }
    
    .mobile-title {
        font-size: 0.8rem;
    }
    
    .mobile-subtitle {
        font-size: 0.6rem;
    }
    
    .mobile-phone,
    .mobile-email {
        font-size: 0.7rem;
    }
    
    .footer-contact {
        font-size: 0.6rem;
    }
    
    footer h6 {
        font-size: 0.75rem;
    }
    
    footer .small {
        font-size: 0.6rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .form-label {
        font-size: 0.8rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .alert {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .form-step h5 {
        font-size: 0.9rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .container.my-5 {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    header {
        padding: 0.3rem 0 !important;
    }
    
    .school-logo-img {
        height: 32px;
    }
    
    .footer-logo-img {
        height: 32px;
    }
    
    .mobile-title {
        font-size: 0.85rem;
    }
    
    .mobile-subtitle {
        font-size: 0.62rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Additional Mobile Improvements */
@media (max-width: 576px) {
    /* Improve touch targets */
    .form-check-input {
        width: 1.2rem;
        height: 1.2rem;
    }
    
    .form-check-label {
        padding-left: 0.5rem;
    }
    
    /* Better spacing for form groups */
    .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    /* Improve file input styling */
    .form-control[type="file"] {
        padding: 0.5rem;
    }
    
    /* Better textarea sizing */
    textarea.form-control {
        min-height: 80px;
    }
    
    /* Improve select dropdown appearance */
    .form-select {
        background-size: 1rem;
        padding-right: 2rem;
    }
    
    /* Better progress bar visibility */
    .progress {
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    }
    
    /* Improve card shadows for mobile */
    .card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* Better button spacing */
    .btn + .btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    /* Improve alert spacing */
    .alert {
        margin-bottom: 1rem;
    }
    
    /* Better form step spacing */
    .form-step {
        margin-bottom: 1rem;
    }
    
    /* Improve badge appearance */
    .badge {
        border-radius: 0.375rem;
    }
    
    /* Better icon sizing */
    .fas, .far, .fab {
        font-size: 0.9em;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Page Styles */
.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.download-btn {
    background: linear-gradient(135deg, var(--success-color), #047857);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
    color: white;
    text-decoration: none;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

