:root {
    --primary-color: #1e3a8a;
    /* Navy Blue */
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    /* Emerald Green */
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --enterprise-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --border-radius-sm: 0.5rem;
    --border-radius-md: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
}

.hero-logo {
    height: 60px;
    width: auto;
}

@media (min-width: 992px) {
    .hero-logo {
        height: 80px;
    }
}

.drop-shadow {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.grayscale-logo {
    filter: grayscale(1) opacity(0.6);
    transition: all 0.3s ease;
}

.grayscale-logo:hover {
    filter: grayscale(0) opacity(1);
}

.circle-icon-wrapper {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .circle-icon-wrapper {
        width: 80px;
        height: 80px;
        margin-bottom: 2rem;
    }
}

/* Base / Mobile Styles */
body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.enterprise-navbar {
    background: var(--enterprise-gradient);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
}

.portal-hero {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem 1.25rem;
    box-shadow: var(--card-shadow);
    margin: -1.5rem 0.75rem 0;
    position: relative;
    z-index: 10;
}

.display-4 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary-color);
}

.btn-enterprise-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    width: 100%;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-enterprise-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    width: 100%;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.btn-enterprise-primary:active,
.btn-enterprise-outline:active {
    transform: scale(0.98);
}

.form-section-title {
    border-left: 4px solid var(--primary-color);
    padding-left: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.card-registration {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.input-group-text {
    background-color: #f1f5f9;
    color: var(--text-muted);
}

/* Tablet (min-width: 768px) */
@media (min-width: 768px) {
    .portal-hero {
        padding: 3rem 2.5rem;
        margin-top: -2.5rem;
        margin-left: 0;
        margin-right: 0;
        border-radius: var(--border-radius-xl);
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .btn-enterprise-primary,
    .btn-enterprise-outline {
        width: auto;
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .form-section-title {
        font-size: 1.25rem;
        padding-left: 1rem;
    }
}

/* Desktop (min-width: 992px) */
@media (min-width: 992px) {
    .display-4 {
        font-size: 3.5rem;
    }

    .btn-enterprise-primary:hover,
    .btn-enterprise-outline:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
    }
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.border-dashed-2 {
    border: 2px dashed #cbd5e1;
    transition: all 0.3s ease;
}

.border-dashed-2:hover {
    border-color: var(--primary-color);
    background-color: #f1f5f9 !important;
}

/* Fix stacking context for dropdowns */
.form-section {
    position: relative;
    /* Ensure dropdowns from earlier sections appear above later sections */
}

/* Using nth-of-type to strictly target the form sections, ignoring HRs/other elements */
.form-section:nth-of-type(1) {
    z-index: 50;
}

/* Borrower */
.form-section:nth-of-type(2) {
    z-index: 40;
}

/* Father */
.form-section:nth-of-type(3) {
    z-index: 30;
}

/* Mother */
.form-section:nth-of-type(4) {
    z-index: 20;
}

/* Guardian */
.form-section:nth-of-type(5) {
    z-index: 10;
}

/* Confirmation */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out forwards;
}

/* Fix for modal layout shift */
body.modal-open {
    padding-right: 0 !important;
}

body.modal-open .enterprise-navbar {
    padding-right: 0 !important;
}

/* Ensure consistent scrollbar width handling */
html {
    scrollbar-gutter: stable;
}
