/* Base Styles */
:root {
    /* --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color2: #3f37c9;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --success-color: #4bb543;
    --error-color: #ff3333;
    --warning-color: #ffcc00;
    --transition: all 0.3s ease; */

    --primary-color: rgb(148, 58, 58);
    --primary-dark: rgb(141, 30, 30);
    --secondary-color2: rgb(151, 52, 52);
    --secondary-color: rgb(146, 19, 19);
    --accent-color: maroon;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --success-color: #4bb543;
    --error-color: #ff3333;
    --warning-color: #ffcc00;
    --transition: all 0.3s ease;
    
    /* Dark theme variables */
    --bg-dark: #121212;
    --card-dark: #1e1e1e;
    --text-dark: #f5f5f5;
    --text-muted-dark: #b0b0b0;
    
    /* Light theme variables */
    --bg-light: #ffffff;
    --card-light: #f8f9fa;
    --text-light2: #212529;
    /* --text-light: maroon; */
    --text-light: #212529;
    --text-muted-light: #6c757d;

    --swal2-background: #1e1e2d;
    --swal2-title-color: #ffffff;
    --swal2-text-color: #cdcdcd;
    --swal2-confirm-button-background: #3699FF;
    --swal2-confirm-button-border-color: #3699FF;
    --swal2-cancel-button-background: #6c757d;
    --swal2-popup-border-radius: 10px;
    --swal2-font-size: 16px;
}

/* create custom classes */
        .my-custom-swal {
        background: linear-gradient(45deg, #667eea, #764ba2) !important;
        border-radius: 20px !important;
        color: white !important;
        }

        .my-custom-swal .swal2-title {
        font-size: 24px !important;
        font-weight: bold !important;
        }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


::-webkit-scrollbar-track {
    border-radius: 0px;
    background-color: none;
    border: none;
}

::-webkit-scrollbar {
    width: 0px;
    background-color: none;
    border: none;
}

::-webkit-scrollbar-thumb {
  border-radius: 0px;
  -webkit-box-shadow: none;
  box-shadow: none;
  /* background-color: var(--accent-color); */
  background-color: none;
  border: none;

}

#_home {
    display: none;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-light);
    color: var(--text-light);
    transition: 0.5s ease-in-out;
    
}

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Theme Toggle */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.navbar-toggler {
    width: 40px;
    height: 40px;
    position: relative;
    color: var(--text-muted-dark);
    right: 50px;
    z-index: 1000;
}

.dark-theme .navbar-toggler {
    color: var(--text-muted-light);
}

/* Navigation */
.navbar {
    padding: 20px 0;
    transition: all 0.3s ease;
} 

.navbar.scrolled {
    padding: 10px 0;
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
}

.navbar-brand i {
    color: var(--text-muted-light);
}

.dark-theme .navbar-brand i {
    color: var(--text-dark);
}

.logo {
    width: 60px;
    height: 60px;
}

.logo img {
    width: 60px;
    height: 60px;
}


.logo-text {
    color: var(--text-light);
}

.dark-theme .logo-text {
    color: var(--text-dark);
}

.logo-highlight {
    color: var(--primary-color);
}

#home {
    color: var(--dark-color);
    font-weight: 500;
    padding: 8px 15px !important;
    transition: all 0.3s ease;
}

.nav-link {
    color: var(--text-muted-light);
    font-weight: 500;
    padding: 8px 15px !important;
    transition: all 0.3s ease;
}

.dark-theme .nav-link {
    color: var(--text-muted-dark);
    font-weight: 500;
    padding: 8px 15px !important;
    transition: all 0.3s ease;
}

.dark-theme #home {
    color: var(--light-color);
    font-weight: 500;
    padding: 8px 15px !important;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.btn-login, .btn-register {
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-register {
    color: maroon;
}

.btn-register:hover {
    color: white;
}

.btn-login:hover, .btn-register:hover {
    transform: translateY(-2px);
    background-color: rgb(133, 54, 54);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    position: relative;
    padding: 120px 0;
    /* background-image: url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80'); */
    background-image: url('/img/bg1.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    overflow: hidden;
    animation: fadeInDown 1s ease 0.6s both;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    animation: float 3s ease 0.6s both infinite;
}

.hero-title span {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    position: relative;
    z-index: 2;
    animation: fadeInDown 1s ease 0.6s both;
}

.hero-illustration {
    position: relative;
    height: 300px;
    z-index: 2;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); /* For older Safari */
    /* Fix 2: Prevent Safari flicker */
    transform: translate3d(0, 0, 0);
    /* Optional: Improve performance further */
    will-change: backdrop-filter;
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    width: 150px;
    height: 150px;
    top: 0;
    left: 50px;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 100px;
    height: 100px;
    top: 100px;
    right: 0;
    animation-delay: 1s;
}

.floating-element:nth-child(3) {
    width: 70px;
    height: 70px;
    bottom: 0;
    left: 100px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    animation: float 5s ease 0.6s both infinite;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-bottom: 50px;
}

.dark-theme .section-subtitle {
    color: var(--text-muted-dark);
}

.col-lg-6 p {
    animation: appear3 ease-in-out;
    animation-timeline: view();
    animation-range: entry 0% cover 20%;
}


/* Animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes float {
            0% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-10px);
            }
            100% {
                transform: translateY(0);
            }
        }

        .floating {
            animation: float 3s ease-in-out infinite;
        }

        @keyframes appear{
            from {
                opacity: 0;
                transform: translateX(-100px);
                transform: translateY(500);
                /* clip-path: inset(100% 100% 0 0); */
            }

            to {
                opacity: 1;
                transform: translateX(0);
                transform: translateY(0);
            }
             /* to {
                opacity: 1;
                clip-path: inset(0 0 0 0);
            } */
        }

        @keyframes appear2{
            from {
                opacity: 0;
                transform: translateX(-100px);
                transform: translateY(500);
                clip-path: inset(100% 100% 0 0);
            }

            /* to {
                opacity: 1;
                transform: translateX(0);
                transform: translateY(0);
            } */
             to {
                opacity: 1;
                clip-path: inset(0 0 0 0);
            }
        }

        @keyframes appear3{
            from {
                opacity: 0;
                transform: translateX(-100px);
                transform: translateY(500);
                clip-path: inset(100% 100% 0 0);
            }

            /* to {
                opacity: 1;
                transform: translateX(0);
                transform: translateY(0);
            } */
             to {
                opacity: 1;
                clip-path: inset(0 0 0 0);
            }
        }

         @keyframes shake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-10px); }
            40%, 80% { transform: translateX(10px); }
        }

        .shake {
            animation: shake 0.5s;
        }


        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        .pulse {
            animation: pulse 2s infinite;
        }

#keyF1 {
    /* animation: appear 0.5s ease-in-out forwards; */
    animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
}

#keyF2 {
    /* animation: appear 0.5s ease-in-out forwards; */
    animation: appear2 ease-in-out;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
}


/* Features Section */
.features-section {
    padding: 100px 0;
    background-color: var(--card-light);
}

.dark-theme .features-section {
    background-color: var(--card-dark);
}

.feature-card {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
    position: relative;
    overflow: hidden;
    animation: appear2 ease-in-out;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
}

.dark-theme .feature-card {
    background-color: var(--card-dark);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background-color: var(--primary-dark);
    transform: rotate(15deg) scale(1.1);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--gray-color);
}

.dark-theme .feature-card p {
    color: var(--text-muted-dark);
}

/* Editable Box Styles */
.editable-box {
    position: relative;
}

.box-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.editable-box:hover .box-actions {
    opacity: 1;
}

.btn-copy, .btn-delete {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy {
    background-color: var(--primary-color);
    color: white;
}

.btn-delete {
    background-color: var(--error-color);
    color: white;
}

.btn-copy:hover, .btn-delete:hover {
    transform: scale(1.1);
}

/* About Section */
.about-section {
    padding: 100px 0;
}

.about-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    animation: appear2 ease-in-out;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(67, 97, 238, 0.3), rgba(63, 55, 201, 0.3));
}

.about-features {
    margin-top: 20px;
}

.about-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.about-features i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.2rem;
    animation: fadeInUp linear;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
}

/* Stats Section */
.stats-section {
    position: relative;
    padding: 80px 0;
    background-image: url('../img/bg2.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
}

.stats-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.stat-item {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background-color: var(--card-light);
    animation: fadeInDown 1s ease 0.3s both;
}

.dark-theme .contact-section {
    background-color: var(--card-dark);
}

.contact-form {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    animation: fadeInDown 1s ease 0.3s both;
}

.dark-theme .contact-form {
    background-color: var(--card-dark);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.contact-form .form-control {
    padding: 12px 15px;
    border-radius: 5px;
    border: 1px solid var(--light-gray);
    transition: all 0.3s ease;
}

.form-control-enhanced.is-invalid ~ .invalid-feedback {
    display: block;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}


.dark-theme .contact-form .form-control {
    background-color: var(--card-light);
    border-color: var(--dark-color);
    color: var(--card-dark);
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.1rem var(--secondary-color2);
}

.contact-info {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.dark-theme .contact-info {
    background-color: var(--card-dark);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.info-item {
    display: flex;
    margin-bottom: 25px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.info-content h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.info-content p {
    color: var(--gray-color);
}

.dark-theme .info-content p {
    color: var(--text-muted-dark);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 80px 0 20px;
}

.footer-about h4 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.footer-about p {
    opacity: 0.8;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    opacity: 0.8;
    transition: all 0.3s ease;
}

.footer-links ul li a:hover {
    opacity: 1;
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-newsletter h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-newsletter h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-newsletter p {
    opacity: 0.8;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 30px 0 0 30px;
    outline: none;
}

.newsletter-form button {
    width: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background-color: var(--primary-dark);
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.7;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--bg-light);
}

.dark-theme .modal-content {
    background-color: var(--card-dark);
    color: var(--text-dark);
    border-style: solid;
    border-width: 0.1px;
    border-color: var(--primary-color);
}

.modal-header {
    border-bottom: 1px solid var(--light-gray);
    padding: 20px;
}

.dark-theme .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid var(--light-gray);
    padding: 15px 20px;
}

.dark-theme .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.form-control {
    padding: 12px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.dark-theme .form-control {
    background-color: var(--bg-dark);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
}


.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 0.25rem;
}

.form-check-label {
    margin-left: 5px;
}

.btn-close {
    filter: invert(0);
}

.dark-theme .btn-close {
    filter: invert(1);
}

/* Password Requirements */
.password-requirements {
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 5px;
}

.dark-theme .password-requirements {
    background-color: rgba(255, 255, 255, 0.05);
}

.password-requirements p {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--gray-color);
}

.dark-theme .password-requirements p {
    color: var(--text-muted-dark);
}

.password-requirements ul {
    margin: 0;
    padding-left: 20px;
}

.password-requirements li {
    font-size: 0.8rem;
    margin-bottom: 3px;
    color: var(--gray-color);
    display: flex;
    align-items: center;
}

.dark-theme .password-requirements li {
    color: var(--text-muted-dark);
}

.password-requirements i {
    font-size: 0.6rem;
    margin-right: 8px;
    color: var(--gray-color);
}

.password-requirements .valid i {
    color: var(--success-color);
}

.dark-theme .text-muted {
    color: var(--text-muted-dark) !important;
}

#successMessage {
    color: var(--success-color);
    font-size: 0.9rem;
    font-weight: 500;
    height: 24px;
    margin-top: 10px;
    transition: var(--transition);
}


/* Forgot Password Modal Styles */
.verification-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    animation: pulse 2s infinite;
}

.verification-inputs {
    gap: 10px;
}

.verification-code {
    width: 45px;
    height: 55px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 0;
}

/* Animation for modal transitions */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: translate(0, -50px) scale(0.95);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: translate(0, 0) scale(1);
    opacity: 1;
}


/* Success checkmark animation */
.checkmark-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 5;
    stroke: #4bb543;
    stroke-miterlimit: 10;
    box-shadow: 0 0 20px rgba(75, 181, 67, 0.3);
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 5;
    stroke-miterlimit: 10;
    stroke: #4bb543;
    fill: none;
    animation: stroke .6s cubic-bezier(0.650, 0.000, 0.450, 1.000) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke .3s cubic-bezier(0.650, 0.000, 0.450, 1.000) .8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes fill {
    100% { box-shadow: 0 0 30px rgba(75, 181, 67, 0.5); }
}

/* Verification modal specific styles */
.verification-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 5px;
}

#timerBadge {
    font-size: 0.9rem;
}

#redirectButton {
    transition: all 0.3s ease;
}

#redirectButton:hover {
    background-color: #6c757d;
    transform: translateY(-2px);
}

/* Progress bar animation */
.progress-bar {
    transition: width 1s linear;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease forwards;
}


/* Success Animation Styles */
.success-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2rem;
    text-align: center;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 5;
    stroke: #4bb543;
    stroke-miterlimit: 10;
    box-shadow: 0 0 20px rgba(75, 181, 67, 0.3);
    margin: 0 auto;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 5;
    stroke-miterlimit: 10;
    stroke: #4bb543;
    fill: none;
    animation: stroke .6s cubic-bezier(0.650, 0.000, 0.450, 1.000) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke .3s cubic-bezier(0.650, 0.000, 0.450, 1.000) .8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: 0 0 30px rgba(75, 181, 67, 0.5);
    }
}

.success-message {
    margin-top: 20px;
    font-size: 1.2rem;
    color: #4bb543;
    font-weight: 500;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out 1s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Error Animation Styles */
.error-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 1.5rem;
    text-align: center;
}

.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 51, 51, 0.1);
    margin: 0 auto 20px;
    position: relative;
    animation: pulseError 2s infinite;
}

.error-icon::before, .error-icon::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 5px;
    background-color: #ff3333;
    border-radius: 2px;
}

.error-icon::before {
    transform: rotate(45deg);
}

.error-icon::after {
    transform: rotate(-45deg);
}

@keyframes pulseError {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 51, 51, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 51, 51, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 51, 51, 0);
    }
}

.error-message {
    margin-top: 15px;
    font-size: 1.1rem;
    color: #ff3333;
    font-weight: 500;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.error-details {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out 0.3s forwards;
}

.dark-theme .error-details {
    color: #ccc;
}

/* Shake animation for form */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s;
}

/* Input error states */
.is-invalid {
    border-color: #ff3333 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ff3333'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.5 3.5 1 4-1 2'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}


.success-animation {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            padding: 2rem;
            text-align: center;
        }

        .checkmark {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            display: block;
            stroke-width: 5;
            stroke: #4bb543;
            stroke-miterlimit: 10;
            box-shadow: 0 0 20px rgba(75, 181, 67, 0.3);
            margin: 0 auto;
            animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
        }

        .checkmark-circle {
            stroke-dasharray: 166;
            stroke-dashoffset: 166;
            stroke-width: 5;
            stroke-miterlimit: 10;
            stroke: #4bb543;
            fill: none;
            animation: stroke .6s cubic-bezier(0.650, 0.000, 0.450, 1.000) forwards;
        }

        .checkmark-check {
            transform-origin: 50% 50%;
            stroke-dasharray: 48;
            stroke-dashoffset: 48;
            animation: stroke .3s cubic-bezier(0.650, 0.000, 0.450, 1.000) .8s forwards;
        }

        @keyframes stroke {
            100% { stroke-dashoffset: 0; }
        }

        @keyframes scale {
            0%, 100% { transform: none; }
            50% { transform: scale3d(1.1, 1.1, 1); }
        }

        @keyframes fill {
            100% { box-shadow: 0 0 30px rgba(75, 181, 67, 0.5); }
        }

        .success-message {
            margin-top: 20px;
            font-size: 1.2rem;
            color: #4bb543;
            font-weight: 500;
        }

        .alert-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1050;
            max-width: 350px;
        }
        
        .alert-success-custom {
            background: white;
            border-left: 5px solid #36b37e;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            transform: translateX(400px);
            opacity: 0;
            transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }
        
        .alert-success-custom.show {
            transform: translateX(0);
            opacity: 1;
        }
        
        .alert-icon {
            background: #36b37e;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            flex-shrink: 0;
        }
        
        .alert-content h4 {
            color: #2c3e50;
            font-size: 18px;
            margin-bottom: 5px;
            font-weight: 600;
        }
        
        .alert-content p {
            color: #7a8ca5;
            margin-bottom: 0;
            font-size: 14px;
        }
        
        .alert-progress {
            position: absolute;
            bottom: 0;
            left: 0;
            height: 4px;
            width: 100%;
            background: #e1e5eb;
            border-radius: 0 0 8px 8px;
            overflow: hidden;
        }
        
        .alert-progress-bar {
            height: 100%;
            width: 100%;
            background: #36b37e;
            animation: progressBar 3s linear forwards;
        }
        
        @keyframes progressBar {
            0% { width: 100%; }
            100% { width: 0%; }
        }


        .password-feedback {
            font-size: 14px;
            margin-top: 5px;
            min-height: 22px;
        }
        
        .strength-bar {
            height: 8px;
            border-radius: 4px;
            margin: 15px 0;
            background: #e1e5eb;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        .strength-bar-inner {
            height: 100%;
            width: 0%;
            border-radius: 4px;
            transition: all 0.3s ease;
        }
        
        .weak {
            background: #e74c3c;
            width: 33%;
        }
        
        .medium {
            background: #f39c12;
            width: 66%;
        }
        
        .strong {
            background: #2ecc71;
            width: 100%;
        }
        
        .strength-label {
            font-weight: 600;
            font-size: 14px;
            text-align: right;
            margin-top: 5px;
        }
        
        .weak-text { color: #e74c3c; }
        .medium-text { color: #f39c12; }
        .strong-text { color: #2ecc71; }

        .status-message {
            padding: 10px;
            border-radius: 5px;
            margin: 15px 0;
            display: none;
        }
        .success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        .error {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }


/* Enhanced Form Styles */
.modal-dialog {
    max-width: 600px;
}

#des_md {
    max-width: 450px;
}


.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.dark-theme .modal-content {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 25px 30px 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
}

.dark-theme .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
}

.modal-title {
    font-weight: 600;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title i {
    font-size: 1.3rem;
}

.modal-body {
    padding: 25px 30px;
}

/* Enhanced Form Groups */
.form-group-enhanced {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dark-theme .form-label {
    color: var(--text-dark);
}

.form-label i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.form-control-enhanced {
    padding: 12px 45px 12px 15px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: var(--bg-light);
    height: 48px;
    width: 90%;
}

.dark-theme .form-control-enhanced {
    background-color: var(--card-dark);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
}

.form-control-enhanced:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    background-color: var(--bg-light);
}

.dark-theme .form-control-enhanced:focus {
    background-color: var(--bg-dark);
}

/* Form Icons */
.form-icon {
    position: relative;
    left: 5px;
    top: 80%;
    transform: translateY(-50%);
    color: var(--gray-color);
    font-size: 1rem;
    pointer-events: none;
}

/* Password Requirements Enhanced */
.password-requirements-enhanced {
    background: rgba(67, 97, 238, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    border-left: 3px solid var(--primary-color);
}

.dark-theme .password-requirements-enhanced {
    background: rgba(67, 97, 238, 0.1);
}

.password-requirements-enhanced p {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-light);
}

.dark-theme .password-requirements-enhanced p {
    color: var(--text-dark);
}

.password-requirements-enhanced ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.password-requirements-enhanced li {
    font-size: 0.8rem;
    margin-bottom: 5px;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.dark-theme .password-requirements-enhanced li {
    color: var(--text-muted-dark);
}

.password-requirements-enhanced li.valid {
    color: var(--success-color);
}

.password-requirements-enhanced li.valid i {
    color: var(--success-color);
}

.password-requirements-enhanced i {
    font-size: 0.6rem;
    transition: color 0.3s ease;
}

/* Enhanced Checkbox */
.form-check-enhanced {
    margin: 1.5rem 0;
}

.form-check-input-enhanced {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
}

.form-check-input-enhanced:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label-enhanced {
    font-size: 0.9rem;
    color: var(--gray-color);
    cursor: pointer;
}

.dark-theme .form-check-label-enhanced {
    color: var(--text-muted-dark);
}

/* Enhanced Buttons */
.btn-enhanced {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-enhanced-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px maroon;
}

.btn-enhanced-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px maroon;
}

.btn-enhanced:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Enhanced Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-grid-full {
    grid-column: 1 / -1;
}

/* Enhanced Modal Footer */
.modal-footer-enhanced {
    padding: 20px 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    background: rgba(0, 0, 0, 0.02);
}

.dark-theme .modal-footer-enhanced {
    border-top-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.modal-footer-enhanced p {
    margin: 0;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.dark-theme .modal-footer-enhanced p {
    color: var(--text-muted-dark);
}

.modal-footer-enhanced a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.modal-footer-enhanced a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Password Strength Meter */
.password-strength {
    margin: 10px 0;
}

.strength-meter {
    height: 6px;
    background: #e1e5eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-meter-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.8rem;
    text-align: right;
    font-weight: 500;
}

.strength-weak { 
    background: #e74c3c; 
    width: 33%; 
}
.strength-medium { 
    background: #f39c12; 
    width: 66%; 
}
.strength-strong { 
    background: #2ecc71; 
    width: 100%; 
}

.strength-weak-text { color: #e74c3c; }
.strength-medium-text { color: #f39c12; }
.strength-strong-text { color: #2ecc71; }

/* Enhanced Input Groups */
.input-group-enhanced {
    position: relative;
}

.input-group-enhanced .form-control-enhanced {
    padding-right: 45px;
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Close Button */
.btn-close-enhanced {
    /* filter: invert(1); */
    transition: opacity 0.3s ease;
}

.btn-close-enhanced:hover {
    opacity: 1;
}

/* Verification Modal Styles */
.verification-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    animation: pulse 2s infinite;
}

.btn-enhanced-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-enhanced-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Countdown timer */
#countdown {
    font-weight: bold;
    color: var(--primary-color);
}

/* Verification code input */
#verificationCode {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 8px;
    text-align: center;
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 8px;
    padding: 12px 15px;
}

.alert-success {
    background-color: rgba(75, 181, 67, 0.1);
    color: #155724;
    border-left: 4px solid #4bb543;
}

.alert-danger {
    background-color: rgba(255, 51, 51, 0.1);
    color: #721c24;
    border-left: 4px solid #ff3333;
}


/* Enhanced Modal Styles */
.modal-lg {
    max-width: 800px;
}

.modal-content {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: none;
}

.modal-header-enhanced {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 24px 30px;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.modal-header-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.2) 0%, 
        rgba(255,255,255,0.5) 50%, 
        rgba(255,255,255,0.2) 100%);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-container {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For older Safari */
    /* Fix 2: Prevent Safari flicker */
    transform: translate3d(0, 0, 0);
    /* Optional: Improve performance further */
    will-change: backdrop-filter;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.icon-container i {
    font-size: 24px;
    color: white;
}

.header-text {
    flex: 1;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.3;
}

.modal-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 4px 0 0;
    font-weight: 400;
}

.btn-close-enhanced {
    background: red;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.btn-close-enhanced:hover {
    color: white;
    background: red;
    opacity: 10;
    transform: rotate(90deg);
}

/* .btn-close-enhanced::before {
    content: '×';
    color: white;
    font-size: 24px;
    line-height: 1;
} */

/* Form Sections */
.enhanced-form {
    padding: 0;
}

.form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dark-theme .form-section {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.section-header h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h6 i {
    font-size: 0.9rem;
}

/* Form Grid Layout */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

#_fa-times-circle {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 30px;
    color: #fffafa;
}

#_fa-times-circle:hover {
    transform: rotate(90deg);
    color: #fffafa;
  }

/* Button loading state styles */
#sendBtn {
    position: relative;
    transition: all 0.3s ease;
}

#sendBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner-border {
    vertical-align: middle;
    margin-left: 8px;
}

/* Optional: Add smooth transitions */
.btn-primary {
    transition: all 0.3s ease-in-out;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(146, 54, 54, 0.3);
}

.verification-code-single {
    font-size: 1.5rem !important;
    letter-spacing: 10px !important;
    text-align: center !important;
    padding: 15px !important;
    font-weight: bold !important;
    border: 2px solid #dee2e6 !important;
    transition: all 0.3s ease !important;
}

.verification-code-single:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.verification-code-single::placeholder {
    letter-spacing: normal !important;
    font-size: 1rem !important;
    color: #6c757d !important;
    opacity: 0.7 !important;
}

/* Responsive Styles */
@media (max-width: 992px) {

    .btn-register {
    margin-top: 10px;
    }

    .hero-title {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .contact-info {
        margin-top: 5%;
    }
}

/* Enhanced Form Controls */
.form-group-enhanced {
    margin-bottom: 20px;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark-theme .form-label {
    color: var(--text-dark);
}

.form-label i {
    color: var(--primary-color);
    font-size: 0.8rem;
    width: 16px;
}

.form-control-enhanced {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--bg-light);
    color: var(--dark-color);
}

.dark-theme .form-control-enhanced {
    background: var(--card-dark);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-dark);
}

.form-control-enhanced:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(148, 58, 58, 0.1);
    outline: none;
}

.input-with-icon {
    position: relative;
}

.input-icon-right {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    pointer-events: none;
}

.email-domain {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--light-gray);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--gray-color);
    pointer-events: none;
}

.dark-theme .email-domain {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted-dark);
}

/* Custom Select */
.custom-select {
    position: relative;
}

.custom-select select {
    appearance: none;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    pointer-events: none;
}

/* Password Input Container */
.password-input-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Enhanced Password Strength Meter */
.password-strength-enhanced {
    margin: 16px 0;
}

.strength-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.strength-text {
    font-weight: 600;
    transition: color 0.3s ease;
}

.strength-meter {
    display: flex;
    gap: 4px;
    height: 6px;
    margin-bottom: 8px;
}

.strength-segment {
    flex: 1;
    background: #e1e5eb;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.dark-theme .strength-segment {
    background: rgba(255, 255, 255, 0.1);
}

.strength-segment.active[data-strength="weak"] {
    background: #e74c3c;
}

.strength-segment.active[data-strength="medium"] {
    background: #f39c12;
}

.strength-segment.active[data-strength="strong"] {
    background: #27ae60;
}

.strength-segment.active[data-strength="very-strong"] {
    background: #2ecc71;
}

/* Password Requirements Grid */
.password-requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--gray-color);
    transition: color 0.3s ease;
}

.dark-theme .requirement-item {
    color: var(--text-muted-dark);
}

.requirement-item.valid {
    color: var(--success-color);
}

.requirement-item.valid i {
    color: var(--success-color);
}

.requirement-item i {
    font-size: 0.5rem;
    transition: color 0.3s ease;
}

/* Password Match Indicator */
.password-match {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--success-color);
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.password-match.visible {
    opacity: 1;
    transform: translateY(0);
}

.password-match i {
    font-size: 0.9rem;
}

/* Terms and Agreement */
.terms-container {
    background: rgba(148, 58, 58, 0.05);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(148, 58, 58, 0.1);
}

.dark-theme .terms-container {
    background: rgba(148, 58, 58, 0.1);
    border-color: rgba(148, 58, 58, 0.2);
}

.form-check-enhanced {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.form-check-input-enhanced {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-input-enhanced:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-label-enhanced {
    font-size: 0.9rem;
    color: var(--gray-color);
    line-height: 1.4;
    cursor: pointer;
}

.dark-theme .form-check-label-enhanced {
    color: var(--text-muted-dark);
}

.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Enhanced Primary Button */
.btn-primary-enhanced {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-primary-enhanced:hover {
    color: rgb(40, 231, 40);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(148, 58, 58, 0.3);
}

.btn-primary-enhanced:active {
    transform: translateY(0);
}

.btn-primary-enhanced::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.7s ease;
}

.btn-primary-enhanced:hover::before {
    left: 100%;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.btn-primary-enhanced:hover .btn-icon {
    transform: translateX(4px);
}

/* Enhanced Modal Footer */
.modal-footer-enhanced {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.02);
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.dark-theme .modal-footer-enhanced {
    background: rgba(255, 255, 255, 0.02);
    border-top-color: rgba(255, 255, 255, 0.1);
}

.footer-text {
    margin: 0;
    color: var(--gray-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dark-theme .footer-text {
    color: var(--text-muted-dark);
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-dark);
    gap: 10px;
}

.footer-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.footer-link:hover i {
    transform: translateX(4px);
}

/* Form Hints */
.form-hint {
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dark-theme .form-hint {
    color: var(--text-muted-dark);
}

/* Loading State */
.btn-primary-enhanced.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-primary-enhanced.loading .btn-text {
    margin-right: 8px;
}

.btn-primary-enhanced.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: loading-spin 1s linear infinite;
}

@keyframes loading-spin {
    to { transform: rotate(360deg); }
}

/* Success State */
.btn-primary-enhanced.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #2ecc71 100%);
}

/* Error States */
.form-control-enhanced.error {
    border-color: var(--error-color);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Dark Theme Adjustments */
.dark-theme .modal-header-enhanced {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
}

.dark-theme .form-control-enhanced::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {


    .hero-section {
        padding: 100px 0;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-image {
        margin-bottom: 30px;
    }
    
    .stat-item h3 {
        font-size: 2.5rem;
    }

    .address-grid {
        grid-template-columns: 1fr;
    }

    .modal-header-enhanced {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .icon-container {
        width: 48px;
        height: 48px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .address-grid {
        grid-template-columns: 1fr;
    }
    
    .password-requirements-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-text {
        flex-direction: column;
        gap: 4px;
    }

    #registerModal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
    min-height: 100vh;
    display: flex;
    align-items: center;
  }
  
  #registerModal .modal-content {
    max-height: 95vh;
    overflow-y: auto;
    border-radius: 16px;
  }
  
  /* Header mobile optimization */
  .modal-header-enhanced {
    padding: 16px 20px !important;
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    z-index: 10;
  }
  
  .header-content {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .header-text {
    flex: 1;
    min-width: 200px;
  }
  
  .modal-title {
    font-size: 1.25rem !important;
    line-height: 1.3;
  }
  
  .modal-subtitle {
    font-size: 0.8rem !important;
    margin-top: 2px;
  }
  
  /* Close button mobile optimization */
  .fa-times-circle[data-bs-dismiss="modal"] {
    font-size: 28px !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 5px;
  }

  
  
  /* Form grid adjustments */
  .responsive-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  
  .address-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  
  /* Form controls mobile optimization */
  .form-control-enhanced {
    height: 44px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    width: 100%;
  }
  
  /* Fix for date input on mobile */
  input[type="date"] {
    min-height: 44px;
  }
  
  /* Select dropdown mobile optimization */
  .custom-select {
    min-height: 44px;
  }
  
  .custom-select select {
    height: 44px;
    font-size: 16px;
  }
  
  /* Email domain adjustment */
  .email-domain {
    position: static;
    transform: none;
    margin-top: 8px;
    display: inline-block;
    padding: 6px 12px;
    background: var(--light-gray);
    border-radius: 6px;
    font-size: 0.85rem;
  }
  
  .dark-theme .email-domain {
    background: rgba(255, 255, 255, 0.1);
  }
  
  /* Password requirements grid */
  .password-requirements-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  
  .requirement-item {
    font-size: 0.75rem;
  }
  
  /* Modal body padding */
  .modal-body {
    padding: 20px !important;
  }
  
  /* Form section spacing */
  .form-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
  }
  
  /* Terms container */
  .terms-container {
    padding: 12px;
  }
  
  /* Button mobile optimization */
  .btn-primary-enhanced {
    padding: 14px 20px;
    font-size: 16px;
    min-height: 52px;
  }
  
  /* Modal footer */
  .modal-footer-enhanced {
    padding: 16px 20px;
    position: sticky;
    bottom: 0;
    background: rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For older Safari */
    /* Fix 2: Prevent Safari flicker */
    transform: translate3d(0, 0, 0);
    /* Optional: Improve performance further */
    will-change: backdrop-filter;
  }
  
  .dark-theme .modal-footer-enhanced {
    background: rgba(255, 255, 255, 0.02);
  }
  
  .footer-text {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  #_home {
    display: block;
  }

  .header-content {
    display: none;
}
    
}


@media (max-width: 576px) {
    /* Navigation */
    .navbar {
        height: 7%;
    } 
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .stat-item {
        margin-bottom: 30px;
    }
    
    .stat-item:last-child {
        margin-bottom: 0;
    }

        .verification-inputs {
        gap: 5px;
    }
    
    .verification-code {
        width: 40px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .verification-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .verification-digit {
        width: 40px;
        height: 50px;
        font-size: 1.2rem;
        margin: 0 2px;
    }

    .modal-dialog {
        max-width: 99%;
    }

    #des_md {
        max-width: 99%;
    }

    
    .modal-body {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal-content {
        margin: 10px;
    }
    
    .responsive-grid {
        grid-template-columns: 1fr;
    }
    
    .form-section {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    /* #registerModal {
        min-width: 100%;
    } */

    .modal-title {
        font-size: 1rem;
    }

    .icon-container {
        width: 35px;
        height: 35px;
    }

    .icon-container i {
        font-size: 20px;
        color: white;
    }

    #registerModal .modal-dialog {
    margin: 0.25rem;
    max-width: calc(100% - 0.5rem);
  }
  
  .modal-header-enhanced {
    padding: 14px 16px !important;
  }
  
  .icon-container {
    width: 40px !important;
    height: 40px !important;
  }
  
  .icon-container i {
    font-size: 18px !important;
  }
  
  .modal-title {
    font-size: 1.1rem !important;
  }
  
  .modal-subtitle {
    font-size: 0.75rem !important;
  }
  
  .modal-body {
    padding: 16px !important;
  }
  
  /* Grid adjustments for very small screens */
  .password-requirements-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Input fields */
  .form-control-enhanced {
    font-size: 15px;
    padding: 12px 14px;
  }
  
  /* Labels */
  .form-label {
    font-size: 0.85rem;
  }
  
  /* Password strength meter */
  .strength-header {
    font-size: 0.8rem;
  }
  
  /* Button adjustments */
  .btn-primary-enhanced {
    padding: 12px 16px;
    font-size: 15px;
  }
  
  /* Terms text */
  .form-check-label-enhanced {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  
  /* Fix for password toggle button */
  .toggle-password {
    right: 10px;
    width: 40px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Adjust select dropdown arrow */
  .select-arrow {
    right: 14px;
  }

}

/* iPhone SE and very small devices */
@media (max-width: 375px) {
  .modal-header-enhanced {
    padding: 12px 14px !important;
  }
  
  .header-content {
    gap: 8px;
  }
  
  .header-text {
    min-width: 160px;
  }
  
  .modal-body {
    padding: 14px !important;
  }
  
  .form-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }
  
  .form-group-enhanced {
    margin-bottom: 16px;
  }
  
  .btn-primary-enhanced {
    min-height: 48px;
  }
  
  /* Adjust form grids */
  .responsive-grid,
  .address-grid {
    gap: 12px;
  }
}

/* Landscape orientation fixes */
@media (max-height: 600px) and (orientation: landscape) {
  #registerModal .modal-content {
    max-height: 85vh;
  }
  
  .modal-header-enhanced {
    padding: 12px 20px !important;
  }
  
  .modal-body {
    padding: 16px 20px !important;
  }
  
  .form-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  
  .form-group-enhanced {
    margin-bottom: 12px;
  }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
  #registerModal .modal-content {
    -webkit-overflow-scrolling: touch;
  }
  
  .form-control-enhanced {
    font-size: 16px; /* Prevents automatic zoom on iOS */
  }
  
  input, select, textarea {
    font-size: 16px;
  }
}

/* Dark theme mobile adjustments */
@media (max-width: 768px) {
  .dark-theme #registerModal .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .dark-theme .form-control-enhanced {
    background: rgba(255, 255, 255, 0.05);
  }
  
  .dark-theme .form-control-enhanced:focus {
    background: rgba(255, 255, 255, 0.08);
  }

    #status{
        font-size: 0.70rem;
    }

    #sex {
        font-size: 0.70rem;
    }

    #region {
        font-size: 0.70rem;
    }

    #province {
        font-size: 0.70rem;
    }

    #municipality {
        font-size: 0.70rem;
    }

    #barangay {
        font-size: 0.70rem;
    }

    #zip-code {
        font-size: 0.70rem;
    }

    #_register {
        width: 100%;
        font-size: 14px;
    }

    #_login {
        width: 100%;
        font-size: 14px;
    }

    .verification-digit {
    width: 50px; /* Adjust as needed */
    height: 60px; /* Optional: make taller too */
    text-align: center;
    font-size: 24px; /* Optional: make text larger */
    margin: 0 5px; /* Optional: add spacing between boxes */
    }

}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .toggle-password {
    min-width: 44px; /* Minimum touch target size */
    min-height: 44px;
  }
  
  .btn-primary-enhanced {
    min-height: 44px;
  }
  
  .form-check-input-enhanced {
    width: 22px;
    height: 22px;
  }
  
  .terms-link {
    padding: 4px 0;
    display: inline-block;
  }
}

/* Smooth scrolling for modal content */
#registerModal .modal-body {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Prevent horizontal scrolling */
#registerModal .modal-content {
  overflow-x: hidden;
}

/* Adjust form grids for medium tablets */
@media (min-width: 577px) and (max-width: 768px) {
  .responsive-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .address-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .password-requirements-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}