:root {
    --primary-color: #0d6efd; /* Bootstrap Blue */
    --secondary-color: #f34f4ff0; /* Orange Accent */
    --dark-color: #022540;
    --light-color: #ecf0f1;
    --text-color: #555;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
}

/* --- HIDE/SHOW HEADER ON SCROLL --- */
.header-scroll {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    transition: top 0.4s ease-in-out;
}

/* --- Logo Bar Styles --- */
.logo-bar {
    background-color: var(--dark-color);
    padding: 15px 0;
    text-align: center;
}
.school-logo-link {
    display: inline-block;
}
.school-logo {
    max-height: 90px;
    max-width: 90%;
    width: auto;
    height: auto;
    transition: max-height 0.3s ease;
}
@media (max-width: 991.98px) {
    .logo-bar {
        padding: 10px 0;
    }
    .school-logo {
        max-height: 60px;
    }
}


/* --- Main Navigation Bar Styles --- */
.main-navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background-color: var(--dark-color);
    padding-top: 0;
    padding-bottom: 0.5rem; /* ADDED for spacing when wrapped */
}
.main-navbar .navbar-nav .nav-link {
    font-weight: 600;
    color: var(--light-color);
    padding: 0.9rem 0.6rem;
    font-size: 0.88rem;
    transition: color 0.3s, background-color 0.3s;
}
.main-navbar .navbar-nav .nav-link:hover,
.main-navbar .navbar-nav .nav-link.active {
    color: #fff;
    background-color: var(--secondary-color);
}
.main-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
    margin: 0.5rem 1rem;
}
.main-navbar .navbar-toggler-icon {
    /* FIXED: Corrected the malformed SVG data URL */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.main-navbar .navbar-toggler:focus {
    box-shadow: none;
}

/* --- RESPONSIVE NAVBAR WRAPPING --- */
/* For screens where the navbar is expanded (lg breakpoint and up) */
@media (min-width: 992px) {
    .main-navbar .navbar-collapse {
        justify-content: center;
    }

    .main-navbar .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 0.5rem;
    }
}

.main-navbar .dropdown-menu {
    border-radius: 0;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}


.main-navbar .dropdown-item {
    color: var(--dark-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
}
.main-navbar .dropdown-item:hover {
    background-color: transparent; 
    
    color: var(--dark-color);
    border-color: var(--secondary-color); 
}

.main-navbar .dropdown-item-text {
    color: var(--text-color);
    padding: 0.25rem 1rem;
    display: flex;
    align-items: center;
}
/* Desktop hover for dropdowns */
@media (min-width: 992px) {
    .main-navbar .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* --- Nav Buttons --- */
.nav-item-buttons {
    display: flex;
    gap: 0.5rem;
    padding-left: 0.6rem;
}

@keyframes blink {
    50% { opacity: 0.4; }
}
.btn-admission.blinking-link {
    animation: blink 1.5s linear infinite;
}
.btn-admission, .btn-enquiry {
    border-radius: 20px;
    padding: 6px 18px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
}
.btn-admission {
    background-color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    color: white;
}
.btn-admission:hover {
    background-color: #e6891a;
    border-color: #e6891a;
    color: white;
}
.btn-enquiry {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}
.btn-enquiry:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Action Buttons container for mobile */
@media (max-width: 991.98px) {
    .nav-item-buttons {
        flex-direction: column;
        width: 100%;
        padding-top: 0.5rem;
        align-items: stretch;
        padding-left: 0;
    }
    .nav-item-buttons .btn {
        text-align: center;
        width: 100%;
    }
    .nav-item-buttons .btn-enquiry {
        margin-bottom: 0.5rem;
    }
}


/* --- Header Animation on Load --- */
.header-animated {
    animation: slideDownFadeIn 0.8s ease-out forwards;
}

@keyframes slideDownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Carousel & Section Styles --- */
.carousel-item {
    background-size: cover;
    background-position: center;
}
.carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    bottom: 50px;
}
#heroCarousel .carousel-item {
    aspect-ratio: 24 / 9;
    min-height: 300px;
}
.section-padding {
    padding: 60px 0;
}
.section-title {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
}
.bg-light {
    background-color: var(--light-color) !important;
}

/* --- Slide-in on Scroll Animation --- */
.slide-in-left,
.slide-in-right {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}
.slide-in-left { transform: translateX(-50px); }
.slide-in-right { transform: translateX(50px); }
.slide-in-left.is-visible,
.slide-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}


/* --- Why Choose Us Section Styles --- */
.feature-box {
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.feature-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: inline-block;
}
.feature-box h5 {
    color: var(--dark-color);
    font-weight: 600;
}

/* --- Gallery Section Styles --- */
.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.gallery-item img {
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}

/* --- Custom Button Style --- */
.btn-secondary-custom {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
    font-weight: 500;
    padding: 10px 25px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.btn-secondary-custom:hover {
    background-color: transparent;
    border-color: #000; 
    color: #000;
}


/* --- Achievements Section Styles --- */
.achievement-box {
    padding: 30px;
    background-color: #fff;
    border-radius: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-bottom: 5px solid var(--secondary-color);
    transition: transform 0.3s ease;
    height: 100%;
}
.achievement-box:hover {
    transform: translateY(-5px);
}
.achievement-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}
.achievement-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
}
.achievement-text {
    color: var(--text-color);
    font-size: 1.1rem;
}

/* --- Video Gallery Section Styles --- */
.video-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}
.video-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.video-item iframe {
    width: 100%;
    height: 100%;
}


/* --- Leadership Message Box (Director & Founder) --- */
.message-box {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--secondary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}
.message-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 20px;
}
.message-content {
    text-align: center;
}
.message-img {
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--light-color);
    height:150px;
}
.message-content p {
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 20px;
}
.message-author h5 {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1.1rem;
}
.message-author small {
    color: var(--text-color);
}


/* --- News & Updates Section --- */
.news-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-color);
}
.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.news-date {
    background-color: var(--secondary-color);
    color: #fff;
    border-radius: 5px;
    text-align: center;
    padding: 10px;
    margin-right: 20px;
    font-weight: 700;
}
.news-date .day {
    font-size: 1.8rem;
    display: block;
    line-height: 1;
}
.news-date .month {
    font-size: 0.8rem;
    text-transform: uppercase;
    display: block;
}
.news-title {
    margin-bottom: 5px;
}
.news-title a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    transition: color 0.3s ease;
}
.news-title a:hover {
    color: var(--secondary-color);
}
.news-content p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.news-slider {
    height: 280px;
    overflow: hidden;
}
.news-slider .swiper-slide { height: auto; }
.news-slider .news-item {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}
.news-slider-wrapper {
    position: relative;
    padding-top: 50px;
    padding-bottom: 50px;
}
.news-slider-prev,
.news-slider-next {
    position: absolute;
    left: 50%;
    width: 35px;
    height: 35px;
    margin-top: 0;
    z-index: 10;
    background-color: var(--light-color);
    color: var(--dark-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.news-slider-prev:hover,
.news-slider-next:hover {
    background-color: var(--secondary-color);
    color: white;
}
.news-slider-prev { top: 0; transform: translateX(-50%); }
.news-slider-next { top: auto; bottom: 0; transform: translateX(-50%); }
.news-slider-prev::after,
.news-slider-next::after { display: none; }
.swiper-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #e9ecef;
}

/* --- Quick Links Section --- */
.quick-links-list {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: 8px;
}
.quick-link-item {
    display: block;
    background-color: #fff;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid #ddd;
}
.quick-link-item:hover {
    transform: translateX(5px);
    background-color: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
}
.quick-link-item:last-child { margin-bottom: 0; }

/* --- Quick Access Menu (Floating Button) --- */
.quick-access-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1040;
}
.quick-access-toggle {
    width: 45px;
    height: 45px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s;
}
.quick-access-toggle:hover {
    transform: scale(1.1);
    background-color: #e6891a;
}
.quick-access-menu {
    position: absolute;
    top: 120%;
    right: 0;
    width: 220px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.quick-access-container.active .quick-access-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.quick-access-item {
    display: flex;
    align-items: center;
    padding: 10px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.quick-access-item:hover {
    background-color: var(--light-color);
    color: var(--secondary-color);
}
.quick-access-item i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    color: var(--secondary-color);
}


/* --- Footer Styles --- */
.footer-map {
    width: 100%;
    height: 200px;
    border-radius: 8px;
}
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
}
.footer h5 {
    color: var(--secondary-color);
    margin-bottom: 20px;
}
.footer ul {
    list-style: none;
    padding-left: 0;
}

/* === MODIFIED SECTION === */
.footer ul li a {
    color: #ccc;
    text-decoration: none;
    line-height: 2;
    transition: color 0.3s;
    position: relative; /* Required for the ::after element */
    padding-bottom: 3px; /* Add space for the line */
    display: inline-block; /* Ensures link respects padding-bottom */
}

/* New rule for the hover line */
.footer ul li a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0); /* Start hidden */
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color); /* The "red" line */
    transform-origin: bottom left;
    transition: transform 0.3s ease-out;
}

.footer ul li a:hover {
    color: white;
    /* Removed: padding-left: 5px; */
}

/* New rule to show the line on hover */
.footer ul li a:hover::after {
    transform: scaleX(1); /* Show the line */
}
/* === END MODIFIED SECTION === */

.footer .social-icons a {
    color: white;
    font-size: 1.5rem;
    margin-right: 15px;
}
.footer .social-icons a:hover {
    color: var(--secondary-color);
}
.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}


 /* Small helper style for legends */
legend {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}
.form-check-label {
    font-size: 0.95rem;
}
.form-check-group {
    padding: 1rem 1.25rem 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}
/* Helper for remove sibling button */
.remove-sibling-btn {
    height: calc(3.5rem + 2px); /* Match form-floating height */
}
/* Make title tooltips show up even on disabled inputs */
input:disabled {
    pointer-events: auto !important;
}

/* === NEW SECTION === */
/* --- Preview Modal Logo (Original) --- */
.preview-logo {
    text-align: center;
    margin-bottom: 2rem;
    /* This class is for the logo inside the preview modal */
}
.preview-logo img {
    max-height: 100px;
    width: auto;
}
/* === END NEW SECTION === */


/* --- FORM VALIDATION STYLES --- */
.error-text {
    color: #dc3545; /* Bootstrap's danger red */
    font-size: 0.875em;
    display: block;
    margin-top: 5px;
    font-weight: 500;
}

.form-error-summary {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 0.375rem;
    display: none; /* Hidden by default */
}
.form-error-summary.show {
    display: block; /* Shown by JS */
}
.form-error-summary ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

/* NEW: Style for the input box itself */
.is-invalid {
    border-color: #dc3545 !important; /* Bootstrap's danger red */
    background-image: none !important; /* Hide Bootstrap's default checkmarks */
}


/* === START: UPDATED PREVIEW STYLES (Adapted from ff2.html) === */

.printable-form-container {
    font-family: Arial, sans-serif; /* From ff2.html */
    color: #000;
    background: #fff;
    padding: 1rem; /* From ff2.html, reduced for modal */
    border: none; /* Outer border removed */
    box-shadow: none; /* Outer shadow removed */
    max-width: 1000px; /* From ff2.html */
    margin: auto; /* From ff2.html */
}

.print-header {
    display: flex;
    flex-direction: column; /* Puts logo above title */
    align-items: center; /* Centers logo and title */
    background-color: #000; /* <-- UPDATED */
    border-bottom: 2px solid #000; /* <-- UPDATED */
    padding-bottom: 20px; /* From ff2.html logo-container */
    margin-bottom: 20px; /* From ff2.html logo-container */
}
.print-logo {
    max-width: 250px; /* <-- UPDATED: Was 150px */
    margin-right: 0; /* Removed margin */
}
.print-title {
    text-align: center; /* Center session text */
    flex-grow: 0; /* Removed flex-grow */
    margin-top: 10px; /* Added space below logo */
}
.print-title h2 {
    font-weight: 700;
    margin-bottom: 0;
    color: #000;
}
.print-title p {
    font-size: 1.25rem;
    margin-bottom: 0;
    color: #fff; /* <-- UPDATED */
}

.print-section-title {
    /* This mimics fieldset h5 from ff2.html */
    font-size: 1.1em;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-top: 15px;
    margin-bottom: 15px;
    font-weight: bold; /* from ff2.html label */
    
    /* Remove old background and border */
    background-color: transparent;
    padding-left: 0;
    padding-right: 0;
    border: none;
    border-bottom: 1px solid #eee; /* add new border */
}

.print-table-top {
    width: 100%;
    margin-bottom: 1rem;
    font-size: 0.9em; /* From ff2.html form-header */
}
.print-table-top td {
    font-size: 1em;
}
.print-table-top strong {
    color: #555; /* From ff2.html label */
    margin-right: 8px;
}


.print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.print-table th,
.print-table td {
    border: 1px solid #ddd; /* From ff2.html table */
    padding: 8px; /* From ff2.html table */
    font-size: 0.9em; /* From ff2.html table */
    vertical-align: top;
    line-height: 1.6;
    /* Set min-height for empty fields */
    min-height: 1.5em; 
}
.print-table th {
    background-color: #f9f9f9; /* From ff2.html table */
    font-weight: bold; /* From ff2.html table */
    text-align: left;
}
.print-table td strong {
    /* This is the filled data */
    color: #000;
    font-weight: normal;
}

/* Specifics for the main info table */
.print-table.main-info {
    border: none;
}
.print-table.main-info > tr > td {
    border: none;
    padding: 0;
}
.details-cell {
    width: 75%;
    padding-right: 1rem;
}
.photo-cell {
    width: 25%;
    text-align: center;
    vertical-align: top;
}
.photo-box {
    /* Styles from ff2.html .photo-placeholder */
    width: 200px; /* <-- UPDATED: Was 170px */
    height: 230px; /* <-- UPDATED: Was 200px */
    border: 2px dashed #aaa;
    background-color: #f9f9f9;
    margin: 0 auto;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 0.9em;
}
.photo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.photo-placeholder {
    width: 100%;
    height: 100%;
}
.photo-cell p {
    font-size: 0.9em;
    color: #777;
    margin-top: 0.25rem;
    text-align: center;
}


.print-table.nested {
    margin-bottom: 0;
}
.print-table.nested td {
    border: 1px solid #ddd; /* match main table */
}

.declaration-box {
    /* Mimic ff2.html .declaration-col */
    border: none;
    padding: 0;
    font-size: 0.9em;
    color: #444;
}
.declaration-box p {
    line-height: 1.6;
}

.signature-box {
    /* Mimic ff2.html .signature-section */
    display: flex;
    justify-content: space-between;
    margin-top: 40px; /* from ff2.html */
    text-align: right;
    font-weight: bold;
    color: #555;
}
.signature-box .sig-col {
    flex: 1;
    padding: 0 1rem;
    text-align: center;
}
.signature-box hr {
    border-top: 1px solid #999;
}

/* NEW: Side-by-side Declaration/Enclosures */
.declaration-enclosure-container {
    display: flex;
    gap: 20px;
    width: 100%;
}
.declaration-col {
    flex: 2; /* More width for declaration */
}
.enclosure-col {
    flex: 1; /* Less width for enclosures */
}

.enclosure-box {
    font-size: 0.9em;
    color: #444;
}
/* END NEW */

/* === END: UPDATED PREVIEW STYLES === */


/* === START: AGGRESSIVE SINGLE-PAGE PRINT STYLES === */

@page {
    size: A4;
    margin: 0.15in; /* <-- AGGRESSIVELY REDUCED MARGINS */
}

@media print {
    /* Hide everything on the page by default */
    body > * {
        display: none !important;
    }

    /* Show the modal and its contents */
    .modal,
    .modal * {
        visibility: visible !important;
    }
    
    /* Make the modal a normal block, not a popup */
    .modal {
        position: relative !important;
        display: block !important;
        overflow: visible !important;
    }

    /* Hide the modal backdrop */
    .modal-backdrop {
        display: none !important;
    }

    /* Use full page width, remove shadows */
    .modal-dialog {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    .modal-content {
        border: none !important;
        box-shadow: none !important;
    }

    /* Force the scrollable body to expand */
    .modal-dialog-scrollable .modal-body {
        overflow: visible !important;
        height: auto !important;
    }

    /* Hide the modal's title and buttons from the printout */
    .modal-header,
    .modal-footer {
        display: none !important;
    }

    /* Ensure the body we want to print is visible */
    #previewModalBody {
        display: block !important;
        padding: 0 !important;
        color: #000;
        font-size: 0.8rem; /* <-- REDUCED base font size */
    }
    
    /* === UPDATED PRINT RULES FOR THE FORM === */
    .printable-form-container {
        border: none !important;
        padding: 0 !important;
        /* filter: grayscale(100%); */ /* <-- REMOVED */
        page-break-inside: auto; 
    }

    .print-logo {
        filter: none; /* Keep the logo in color */
        max-width: 200px !important; /* <-- UPDATED */
        max-height: 80px !important; /* <-- UPDATED */
    }
    
    .print-header {
        background-color: #000 !important; /* <-- UPDATED */
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
        padding-bottom: 0.1rem !important; /* <-- REDUCED */
        margin-bottom: 0.1rem !important; /* <-- REDUCED */
    }
    
    .print-title h2 {
        margin-bottom: 0 !important;
        font-size: 1.5rem !important;
    }
    .print-title p {
        font-size: 1rem !important;
        color: #fff !important; /* <-- UPDATED */
    }

    .print-table th,
    .print-table td {
        border-color: #666 !important;
        padding: 1px 3px !important; /* <-- REDUCED padding */
        font-size: 0.75rem !important; /* <-- REDUCED font size */
        min-height: 1.2em !important; 
    }
    
    .print-section-title {
        background-color: #e0e0e0 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
        margin-top: 0.1rem !important;  /* <-- REDUCED */
        margin-bottom: 0.05rem !important; /* <-- REDUCED */
        padding: 1px 3px !important; /* <-- REDUCED padding */
        font-size: 0.85rem !important; /* <-- REDUCED */
        page-break-before: avoid;
        page-break-inside: avoid; 
    }

    .print-table {
        margin-bottom: 0.1rem !important; /* REDUCED */
        page-break-inside: avoid; 
    }
    
    .print-table td strong {
        color: #000 !important; /* Make data black for printing */
    }
    
    .photo-box {
        width: 120px !important; /* <-- UPDATED */
        height: 145px !important; /* <-- UPDATED */
    }
    .photo-cell p {
        font-size: 0.7rem !important;
    }
    
    /* --- NEW PRINT STYLES FOR SIDE-BY-SIDE --- */
    .declaration-enclosure-container { 
        display: flex; 
        width: 100%; 
        page-break-inside: avoid; 
        gap: 10px !important; 
    }
    .declaration-col { 
        flex-basis: 65%; 
        padding-right: 0 !important; 
    }
    .enclosure-col { 
        flex-basis: 35%; 
    }
    
    .declaration-box {
         padding: 0.1rem !important; /* <-- REDUCED padding */
         font-size: 0.7rem !important; /* <-- REDUCED */
         border: none !important;
    }
    .declaration-box ol {
        padding-left: 1rem !important;
        margin-bottom: 0.2rem !important;
    }
    .declaration-box p {
        margin-bottom: 0 !important;
    }

    .enclosure-box {
        font-size: 0.7rem !important;
    }
    .enclosure-box ol {
        margin-bottom: 0;
    }

    .signature-box {
        margin-top: 0.2rem !important; /* <-- REDUCED */
        page-break-inside: avoid; /* Don't split the signature box */
    }
    .signature-box .sig-col {
        font-size: 0.75rem !important;
        font-weight: normal !important;
    }
    
    /* Hide the list group bullets in print */
    .list-group-item {
        border: none !important;
        padding: 0 !important;
        font-size: 0.7rem !important; /* <-- REDUCED */
    }
    .list-group-item i {
        display: none; /* Hide the checkmark icon */
    }
}
/* === END: AGGRESSIVE SINGLE-PAGE PRINT STYLES === */