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

/* Glass effect backdrop - blur behind modal */
.modal-backdrop.glass-backdrop {
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

/* Login / Register modal card - same glass style */
.login-modal-card,
.register-modal-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 18px 50px rgba(15, 23, 42, 0.14),
        0 1px 0 rgba(255, 255, 255, 0.55) inset,
        0 0 0 1px rgba(15, 23, 42, 0.05);
    transform: translateY(0);
    transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.modal.show .login-modal-card,
.modal.show .register-modal-card {
    transform: translateY(-2px);
}

.login-modal-card:hover,
.register-modal-card:hover {
    box-shadow:
        0 22px 60px rgba(15, 23, 42, 0.16),
        0 1px 0 rgba(255, 255, 255, 0.55) inset,
        0 0 0 1px rgba(15, 23, 42, 0.05);
}

.login-modal-card .modal-body,
.register-modal-card .modal-body {
    padding: 1rem 1.5rem 1.5rem;
}

.login-modal-card .modal-title,
.register-modal-card .modal-title {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.login-modal-card .form-label,
.register-modal-card .form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1B433251;
}

.login-modal-card .form-control,
.register-modal-card .form-control,
.login-modal-card .form-select,
.register-modal-card .form-select {
    border-radius: 10px;
    border: 1px solid rgba(17, 24, 39, 0.12);
    background-color: rgba(249, 250, 251, 0.75);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.login-modal-card .form-control:hover,
.register-modal-card .form-control:hover,
.login-modal-card .form-select:hover,
.register-modal-card .form-select:hover {
    border-color: rgba(17, 24, 39, 0.18);
    transform: translateY(-0.5px);
}

.btn-login-modal,
.btn-register-modal {
    background-color: #341539;
    border-color: #341539;
    border-radius: 999px;
    font-weight: 600;
    padding: 0.6rem 1rem;
    letter-spacing: 0.02em;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    transition: background-color 0.2s ease, filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-login-modal:hover,
.btn-register-modal:hover {
    background-color: #26102a;
    border-color: #26102a;
    filter: brightness(0.98);
    transform: translateY(-1px);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
}

.btn-login-modal:active,
.btn-register-modal:active {
    transform: translateY(0);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.login-modal-card .form-control:focus,
.register-modal-card .form-control:focus,
.login-modal-card .form-select:focus,
.register-modal-card .form-select:focus {
    border-color: #341539;
    background-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.10), 0 10px 26px rgba(15, 23, 42, 0.10);
}

.register-modal-card .modal-header,
.login-modal-card .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-glass-link {
    color: #341539;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}
.modal-glass-link:hover {
    color: #26102a;
}

.modal-glass-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.modal-glass-link:hover::after {
    transform: scaleX(1);
}

/* --------------------------------------------------
 * Public landing page layout + scroll animations
 * Inspired by Anchor Lincoln visual style (structure
 * and motion only – not copying their content)
 * -------------------------------------------------- */

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f9fafb;
    color: #111827;
}

h1,
h2,
h3,
.section-title,
.mission-card-title {
    font-family: 'Montserrat', sans-serif !important;
}

.dashboard-main {
    padding-top: 0; /* allow first section to sit directly under navbar */
}

.hero-oic {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: none !important; 
    color: rgba(248, 250, 252, 0.85);
    margin-bottom: 1rem;
}

/* Section layout */
.section {
    padding: 4.5rem 0;
    background-color: #f9fafb;
}

.section-muted {
    background-color: #f3f4f6;
}

.church-hero {
    position: relative;
    margin: 0;
    padding-top: 0; /* Ensure hero starts at top */
}

.church-hero-image {
    width: 100%;
    height: 100vh;
    min-height: 420px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.church-hero-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.church-hero-title {
    margin: 0;
    padding: 0 1rem;
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: none !important;
    color: #ffffff;
    text-shadow:
        0 18px 40px rgba(0, 0, 0, 0.65),
        0 0 12px rgba(0, 0, 0, 0.65);
}

.church-hero-actions {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.btn-hero-primary,
.btn-hero-secondary {
    border-radius: 999px;
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: none !important;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.btn-hero-primary {
    background-color: #ffffff;
    color: #341539;
    border: 1px solid #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.btn-hero-primary:hover {
    background-color: #f3f4f6;
    color: #341539;
    transform: translateY(-1px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.btn-hero-secondary {
    background-color: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    border: 1px solid #341539;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.btn-hero-secondary:hover {
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
}

.section-header {
    max-width: 640px;
    margin-inline: auto;
    text-align: left;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.section-subtitle {
    font-size: 0.98rem;
    color: #6b7280;
    margin-bottom: 0;
}

/* Intro text block (Austin Stone–style) */
.intro-section {
    padding: 5rem 0 4rem;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
}

.intro-eyebrow {
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.20em;
    text-transform: none !important;
    color: #9ca3af;
}

.intro-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.85rem;
}

.intro-body {
    font-size: 0.98rem;
    line-height: 1.8;
    color: #2B2B2B;
    margin: 0;
}

/* Event cards */* Upcoming events */
    #events {
        background-color: #F6F1E6;
    }
.event-card {
    height: 100%;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.event-image-wrapper {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    height: 120px;
    width: 100%;
}

.event-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.event-image-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.event-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

/* Events Grid - 3 events per row */
.events-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 360px)) !important;
    justify-content: center !important;
    gap: 2rem !important;
    margin-bottom: 3rem !important;
    width: 100% !important;
    align-items: stretch !important;
}

.events-grid .event-card,
.events-grid .event-card:hover {
    width: 100% !important;
    margin-bottom: 0 !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 30px -10px rgba(0, 59, 92, 0.25) !important;
    overflow: hidden !important;
    transform: none !important;
    transition: none !important;
    height: 100% !important;
    border: none !important;
}

/* Override any existing flex layouts */
.events-container .events-grid {
    display: grid !important;
    flex: none !important;
}

.event-image-wrapper {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    height: 200px;
    width: 100%;
}

.event-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.event-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

.event-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-height: 120px;
}

.event-date-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.event-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1B4332;
    text-transform: none !important;
    letter-spacing: 0.1em;
}

.event-time {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 400;
}

.event-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.event-button,
.events-grid .event-card .event-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.75rem 1.5rem !important;
    background: #1B4332 !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 0px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    margin-top: 1rem !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    min-width: 120px !important;
}

.event-button:hover,
.events-grid .event-card .event-button:hover {
    background: #0096FF !important;
    transform: translateY(-1px) !important;
}

@media (max-width: 992px) {
    .events-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 360px)) !important;
        justify-content: center !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 360px)) !important;
        justify-content: center !important;
        gap: 1.5rem !important;
    }
}
.events-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
}

.events-row > [class*="col-"] {
    flex: 0 0 auto;
    width: 280px;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .events-row {
        flex-wrap: wrap;
        overflow-x: visible;
        scroll-snap-type: none;
    }

    .events-row > [class*="col-"] {
        flex: 0 0 auto;
        width: 33.3333%;
    }
}

/* Austin Stone–style \"What's happening\" list */
.events-happening {
    display: grid;
    grid-template-columns: 1.05fr 1.4fr;
    gap: 3rem;
    align-items: start;
}

.events-happening-title {
    margin: 0 0 0.75rem;
    font-size: clamp(2.2rem, 4vw, 3.1rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #111827;
}

.events-happening-subtitle {
    margin: 0;
    color: #6b7280;
    max-width: 26rem;
    line-height: 1.7;
}

.events-happening-right {
    border-top: 1px solid rgba(17, 24, 39, 0.10);
}

.event-row {
    width: 100%;
    display: grid;
    grid-template-columns: 72px 1fr 28px;
    gap: 1.25rem;
    align-items: center;
    padding: 1.1rem 0;
    border: 0;
    background: transparent;
    text-align: left;
    border-bottom: 1px solid rgba(17, 24, 39, 0.10);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.event-row:hover {
    background-color: rgba(52, 21, 57, 0.04);
    transform: translateX(2px);
}

.event-row-date {
    display: grid;
    gap: 0.15rem;
    align-content: start;
    font-variant-numeric: tabular-nums;
}

.event-row-month {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: none !important;
    color: #6b7280;
    font-weight: 600;
}

.event-row-day {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.event-row-meta {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: none !important;
    color: #9ca3af;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.event-row-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.event-row-arrow {
    font-size: 1.25rem;
    color: #111827;
    opacity: 0.9;
}

@media (max-width: 991.98px) {
    .events-happening {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Mass schedule table */
.schedule-table {
    border-radius: 16px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
}

.schedule-table thead {
    background-color: #341539;
    color: #e5e7eb;
}

.schedule-table thead th {
    border-bottom-color: rgba(15, 23, 42, 0.4);
}

.schedule-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.schedule-table tbody td {
    border-top-color: rgba(209, 213, 219, 0.6);
}

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #341539;
    cursor: pointer;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.18);
}

.gallery-image {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-category {
    position: absolute;
    bottom: 0.9rem;
    left: 0.9rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: none !important;
    background-color: rgba(52, 21, 57, 0.9);
    color: #e5e7eb;
    backdrop-filter: blur(12px);
}

/* Looping sideways gallery marquee - DISABLED */
/* .gallery-marquee {
    position: relative;
    overflow: hidden;
}

.gallery-marquee-track {
    display: flex;
    gap: 1rem;
    animation: gallery-marquee-scroll 10s linear infinite;
}

.gallery-marquee-item {
    flex: 0 0 auto;
    width: 360px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.gallery-marquee-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
} */

@keyframes gallery-marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 767.98px) {
    .gallery-marquee-item {
        width: 280px;
    }

    .gallery-marquee-image {
        height: 200px;
    }
}


.input-with-icon {
    position: relative !important;
}

/* Icon inside input */
.input-icon {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #6b7280 !important;
    font-size: 14px !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 14px !important;
    height: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* Target form controls specifically */
.login-modal-card .form-control.with-icon,
.register-modal-card .form-control.with-icon {
    padding-left: 40px !important;
    height: 42px !important;
    line-height: 42px !important;
    display: block !important;
}

/* Force icon alignment for FontAwesome icons */
.fa-lock,
.fa-envelope,
.fa-user {
    display: inline-flex !important;
    width: 16px !important;
    height: 16px !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

/* Specific icon container fixes */
.input-icon i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    line-height: 1 !important;
}

/* About text block */
.about-text {
    font-size: 0.98rem;
    line-height: 1.7;
    color: #4b5563;
    max-width: 1100px;
    text-align: center;
    margin-inline: auto;
}

/* About section overrides */
#about.section {
    padding: 10px 0;
}

#about .section-header {
    text-align: center;
}

#about .section-title {
    letter-spacing: 0.08em;
    text-transform: none !important;
}

/* Mission & vision section */
.mission-section {
    padding: 50px 0;
    background: linear-gradient(135deg, #341539 0%, #45214b 40%, #341539 100%);
    color: #f9fafb;
}

.mission-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.mission-section .section-title {
    color: #ffffff;
}

.mission-section .section-subtitle {
    color: rgba(249, 250, 251, 0.85);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.mission-card {
    background-color: rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    padding: 1.75rem 1.5rem;
    border: 1px solid rgba(249, 250, 251, 0.08);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.mission-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    border-color: rgba(249, 250, 251, 0.22);
    background-color: rgba(15, 23, 42, 0.16);
}

.mission-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: none !important;
    margin-bottom: 0.5rem;
}

.mission-card-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(249, 250, 251, 0.9);
}

/* Footer tweaks to feel like a calm church site */
.dashboard-footer {
    background-color: #341539;
    color: #e5e7eb;
    padding: 3rem 0 2.5rem;
}

.footer-heading {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: none !important;
    margin-bottom: 0.75rem;
}

.footer-link {
    color: #e5e7eb;
    text-decoration: none;
}

.footer-link:hover {
    color: #341539;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.7);
    color: #e5e7eb;
    font-size: 0.8rem;
    text-decoration: none;
    margin-right: 0.35rem;
    transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.social-pill:hover {
    background-color: #341539;
    color: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(52, 21, 57, 0.45);
}

.footer-bottom {
    border-top: 1px solid rgba(55, 65, 81, 0.7);
    padding-top: 1rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* --------------------------------------------------
 * Scroll reveal / text pop-up animations
 * -------------------------------------------------- */

.reveal-up,
.reveal-fade,
.reveal-card {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal-fade {
    transform: translateY(12px);
}

.reveal-card {
    transform: translateY(30px);
}

.reveal-up.is-visible,
.reveal-fade.is-visible,
.reveal-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slight stagger helpers when multiple children reveal */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal-stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.02s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.06s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.10s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.14s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.18s; }

/* Shake animation for password mismatch */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out !important;
}

.password-mismatch {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* More specific rules for password fields */
.form-control.shake,
.register-modal-card .form-control.shake,
input.form-control.shake,
input.form-control.with-icon.shake {
    animation: shake 0.5s ease-in-out !important;
    transform: translateX(0) !important;
}

.form-control.with-icon.shake {
    animation: shake 0.5s ease-in-out !important;
}

.form-control.password-mismatch,
.register-modal-card .form-control.password-mismatch,
input.form-control.password-mismatch,
input.form-control.with-icon.password-mismatch {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.form-control.with-icon.password-mismatch {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Force animation during keyframes */
@keyframes shake {
    0%, 100% { transform: translateX(0) !important; }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-12px) !important; }
    20%, 40%, 60%, 80% { transform: translateX(12px) !important; }
}

/* Enhanced shake animation with more force */
@keyframes shake-enhanced {
    0%, 100% { transform: translateX(0) scale(1) !important; }
    10% { transform: translateX(-10px) scale(1.02) !important; }
    20% { transform: translateX(10px) scale(1.02) !important; }
    30% { transform: translateX(-10px) scale(1.02) !important; }
    40% { transform: translateX(10px) scale(1.02) !important; }
    50% { transform: translateX(-8px) scale(1.01) !important; }
    60% { transform: translateX(8px) scale(1.01) !important; }
    70% { transform: translateX(-6px) !important; }
    80% { transform: translateX(6px) !important; }
    90% { transform: translateX(-3px) !important; }
}

.shake-enhanced {
    animation: shake-enhanced 0.6s ease-in-out !important;
}

/* Shared tablet/WebView containment. Components may still choose their own
   layout, but none may force the document wider than the visual viewport. */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

main, section, header, footer,
.dashboard-main, .container, .container-fluid, .row,
.card, .modal-content {
    min-width: 0;
}

img, video, iframe, svg, canvas {
    max-width: 100%;
}

@media (max-width: 1199.98px) {
    .container, .container-fluid {
        width: 100%;
        max-width: 100% !important;
    }

    h1, h2, h3, h4, h5, h6,
    p, a, button, span {
        overflow-wrap: anywhere;
    }
}
