/* ================
   CSS Variables
   ================ */
:root {
    --primary-color: #0a2540;
    --secondary-color: #00d4ff;
    --accent-color: #0796e4;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --button-color: #ff8c62;
    --black-color: black;
}

/* ================
   Base Styles
   ================ */
body {
    font-family: 'EB Garamond', serif, 'Trebuchet MS', Verdana, Arial, Helvetica, sans-serif, 'Poppins', sans-serif;
    color: var(--dark-color);
    font-weight: lighter;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    padding-top: 70px; /* To account for fixed navbar */
}

/* ================
   Navbar Styles
   ================ */
.navbar {
    background-color: #031c44;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    transition: transform 0.3s ease-in-out;
}

.navbar.scroll-up {
    transform: translateY(0);
}

.navbar.scroll-down {
    transform: translateY(-100%);
}

.navbar-brand img {
    height: 50px;
    transition: all 0.3s ease;
}

.nav-link {
    color: var(--light-color);
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Active state styles */
.navbar-nav .nav-item .nav-link.active {
    color: var(--accent-color) !important;
}

.navbar-nav .nav-item .nav-link.active:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--light-color);
    padding: 8px 20px;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--light-color);
    border-color: var(--light-color);
    color: var(--primary-color);
}

/* Navbar Toggler Customization */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    font-size: 1.25rem;
    color: var(--light-color);
    background: transparent;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler .navbar-toggler-icon {
    display: none;
}

.navbar-toggler .fa-times {
    display: none;
}

.navbar-toggler.collapsed .fa-bars {
    display: inline-block;
}

.navbar-toggler.collapsed .fa-times {
    display: none;
}

.navbar-toggler:not(.collapsed) .fa-bars {
    display: none;
}

.navbar-toggler:not(.collapsed) .fa-times {
    display: inline-block;
}

/* Mobile Menu Styles */
@media (max-width: 992px) {
    .navbar-collapse {
        background-color: #031c44;
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 0.25rem;
    }

    .navbar-nav {
        padding-top: 1rem;
    }

    .nav-item {
        margin-bottom: 0.5rem;
    }

    .btn-primary {
        margin-top: 1rem;
        margin-left: 0 !important;
        width: 100%;
    }
}

/* ================
   Hero Section
   ================ */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
                url('/assets/img/hero.png') no-repeat center 10% fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    padding: 100px 20px;
    height: 100vh;
    overflow: hidden;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    transition: opacity 1.2s ease;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ================
   Custom Animations
   ================ */
[data-aos="smooth-fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition-property: transform, opacity;
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    will-change: transform, opacity;
}

[data-aos="smooth-fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="smooth-scale-up"] {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
    transition-property: transform, opacity;
    transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform, opacity;
}

[data-aos="smooth-scale-up"].aos-animate {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ================
   Text & Button Styles
   ================ */
.hero-title {
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 400;
    line-height: 1.2;
    font-family: 'EB Garamond', serif;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    transform-origin: center bottom;
}

.hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 300;
    opacity: 0;
    margin-top: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    transition: opacity 0.6s ease 0.3s;
}

[data-aos="smooth-fade-up"].aos-animate .hero-subtitle {
    opacity: 0.9;
}

.btn-apply {
    background-color: var(--button-color);
    color: var(--light-color);
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
    min-width: 220px;
    text-align: center;
    margin-top: 30px;
    transform-origin: center center;
}

.btn-apply:hover {
    background-color: var(--button-color);
    color: var(--light-color);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
        padding: 60px 20px;
        height: auto;
        min-height: 100vh;
        text-align: center;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .btn-apply {
        width: 100%;
        padding: 12px 0;
        font-size: 1rem;
        min-width: unset;
    }
}

.section-title {
    font-size: 64px;
    font-weight: 400;
    color: var(--light-color);
    margin-bottom: 30px;
}

/* ================
   Animated Dividers
   ================ */
.title-divider {
    width: 0;
    height: 1px;
    background-color: var(--black-color);
    margin-top: 20px;
    animation: expandWidth 1s ease-out forwards;
    animation-delay: 0.3s;
}

.stat-divider {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5px;
    height: 0;
    background-color: var(--dark-color);
    animation: expandHeight 0.8s ease-out forwards;
    animation-delay: 0.4s;
}

.stat-divider-2 {
    width: 0;
    height: 1px;
    background-color: var(--dark-color);
    margin: 0 auto 15px auto;
    animation: expandWidthCustom 0.6s ease-out forwards;
    animation-delay: 0.5s;
}

.mobile-divider {
    width: 0;
    height: 1px;
    background-color: var(--dark-color);
    animation: expandWidthCustom2 0.7s ease-out forwards;
    animation-delay: 0.6s;
}

.solution-divider {
    height: 2px;
    background-color: var(--light-color);
    width: 100%;
    position: relative;
}

.faq-divider {
    height: 1px;
    background-color: var(--light-color);
    width: 100%;
    position: relative;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes expandHeight {
    from { height: 0; }
    to { height: 80%; }
}

@keyframes expandWidthCustom {
    from { width: 0; }
    to { width: 150px; }
}

@keyframes expandWidthCustom2 {
    from { width: 0; }
    to { width: 350px; }
}

/* ===============================
   Why Choose Section
   =============================== */

/* Main Section Background & Padding */
.why-choose-section {
    background-color: #ffffff;
    padding: 80px 0;
}

/* Section Title Styles */
.section-title-2 {
    font-size: 64px;
    font-weight: 400;
    color: var(--primary-color);
    font-family: 'EB Garamond', serif;
    line-height: 1.2;
    text-align: start;
}

/* Statistic Item Card */
.stat-item {
    background-color: #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

/* Statistic Number */
.stat-number {
    font-size: 114px;
    font-weight: 400;
    color: var(--primary-color);
    line-height: 1;
    font-family: 'EB Garamond', serif;
}

/* Statistic Title */
.stat-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Statistic Description */
.stat-description {
    font-size: 18px;
    color: #555555;
    line-height: 1.5;
}

/* ===============================
   Responsive Adjustments
   =============================== */

/* Medium Devices (≤ 992px) */
@media (max-width: 992px) {
    .section-title {
        font-size: 48px;
    }
    .stat-number {
        font-size: 90px;
    }
    .stat-divider {
        height: 70%;
    }
}

/* Tablets (≤ 768px) */
@media (max-width: 768px) {
    .section-title {
        font-size: 36px;
    }
    .stat-number {
        font-size: 72px;
    }
    .stat-title {
        font-size: 20px;
    }
    .stat-description {
        font-size: 16px;
    }
    .title-divider {
        width: 70%;
    }
}

/* Mobile Phones (≤ 576px) */
@media (max-width: 576px) {
    .section-title {
        font-size: 32px;
    }
    .stat-number {
        font-size: 60px;
    }
    .title-divider {
        width: 100%;
    }
}

/* ===============================
   Loan Solutions Section
   =============================== */

.loan-solutions-section {
    padding: 80px 0;
    background-color: var(--black-color);
    color: var(--light-color);
}

.section-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'EB Garamond', serif;
}

.solution-item {
    padding: 100px 0;
}

.solution-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}

.blue-icon {
    color: #007BFF;
    fill: currentColor;
}

.solution-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.solution-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .solution-icon {
        width: 70px;
        height: 70px;
    }

    .solution-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .solution-item .row {
        flex-direction: column;
        text-align: center;
    }

    .solution-icon {
        margin-bottom: 15px;
    }

    .solution-title {
        font-size: 1.5rem;
    }

    .solution-description {
        font-size: 1rem;
    }
}

/* ===============================
   Our History Section
   =============================== */

.our-history-section {
    background-color: #404040;
    padding: 80px 0;
}

.history-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    color: var(--light-color)
}

.mission-btn {
    color: #404040;
    background-color: var(--light-color);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 400;
    border: none;
    transition: all 0.3s ease;
}

.mission-btn:hover {
    background-color: #d7e1eb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.main-history-img {
    height: 400px;
    object-fit: cover;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.secondary-history-img {
    width: 658px;
    height: 850px;
    object-fit: cover;
    object-position: 50% 50%;
}

.zoom-wrapper {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.zoom-image-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    will-change: transform;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .history-title {
        font-size: 2.8rem;
    }

    .main-history-img,
    .secondary-history-img {
        height: auto;
    }
}

@media (max-width: 768px) {
    .history-title {
        font-size: 2.4rem;
    }

    .history-description {
        font-size: 1rem;
    }

    .main-history-img,
    .secondary-history-img {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .history-title {
        font-size: 2rem;
    }

    .main-history-img {
        height: 250px;
        margin-bottom: 15px;
    }

    .secondary-history-img {
        height: 200px;
    }
}

/* ===============================
   Our Borrowers Section
   =============================== */

.our-borrowers-section {
    background-color: #ffffff;
    padding: 110px 0;
}

.borrower-icon-wrapper {
    transition: all 0.3s ease;
    border-radius: 8px;
    width: max-content;
    height: max-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.borrower-icon-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.borrower-type {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0a2540;
}

.solution-icon-2 {
    width: 150px;
    height: auto;
}

/* Responsive Borrower Grid Layout */
@media (min-width: 992px) {
    .our-borrowers-section .row.gx-1.gx-md-4.gx-lg-5.g-4 > div[class*="col-"] {
        flex: 0 0 20%;
        max-width: 20%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 991.98px) {
    .our-borrowers-section .row.gx-1.gx-md-4.gx-lg-5.g-4 > div[class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .borrower-icon-wrapper {
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .our-borrowers-section .row.gx-1.gx-md-4.gx-lg-5.g-4 > div[class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .solution-icon-2 {
        width: 150px;
        height: 150px;
    }

    .borrower-icon-wrapper {
        padding: 0.5rem;
    }
}

@media (min-width: 1200px) {
    .our-borrowers-section .row > [class*="col-lg-2"] {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* ===============================
   Testimonials Section
   =============================== */

.testimonials-section {
    padding: 80px 0;
    background-color: white;
}

.testimonial-text {
    font-size: 1.1rem;
    color: var(--black-color);
    padding: 0px 30px 30px 35px;
}

.testimonial-author {
    font-size: 1.4rem;
    color: var(--black-color);
    margin-bottom: 15px;
    padding-top: 110px;
}

.solution-icon-3 {
    width: 35px;
    height: 35px;
    opacity: 1.2;
    margin-top: 15px;
}

.reverse-xy {
    transform: scale(-1, -1) !important;
}

@media (max-width: 768px) {
    .section-title-2 {
        font-size: 2rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .testimonial-author {
        font-size: 1rem;
    }
}

/* ===============================
   Footer Section
   =============================== */

.footer-section {
    background-color: #404040;
    color: var(--light-color);
    padding: 4rem 0;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.footer-content, .newsletter-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-logo {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--light-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.newsletter-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--light-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-heading {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    margin-bottom: 1rem;
}

.contact-link, .footer-link {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link {
    text-decoration: underline;
}

.newsletter-form .form-control {
    background-color: var(--light-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--black-color);
    padding: 0.75rem 1rem;
    height: auto;
    min-width: 200px;
}

.newsletter-form .form-control:focus {
    background-color: var(--light-color);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--black-color);
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.btn-subscribe {
    background-color: transparent;
    color: var(--light-color);
    border: 1px solid white;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 100%;
}

.btn-subscribe:hover {
    background-color: var(--black-color);
    color: var(--light-color);
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.15em;
}

.form-check-label {
    margin-left: 0.5rem;
}

.copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .footer-section {
        padding: 3rem 0;
        min-height: auto;
    }

    .footer-content, .newsletter-container {
        padding: 2rem 0;
    }
}

@media (max-width: 768px) {
    .footer-section {
        padding: 2.5rem 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem !important;
    }
}

@media (max-width: 576px) {
    .footer-section {
        padding: 2rem 0;
        height: auto;
    }

    .footer-content {
        text-align: center;
    }

    .newsletter-form .d-flex {
        flex-direction: column;
        gap: 0.75rem !important;
    }

    .btn-subscribe {
        width: 100%;
        padding: 0.75rem;
    }

    .form-control {
        width: 100%;
    }
}

/* ===============================
   About Section
   =============================== */

.about-section {
    padding: 80px 0;
    background-color: var(--black-color);
}

.about-section p {
    color: var(--light-color);
    line-height: 1.2;
}

.about-hero-section {
    background-color: #f8f9fa;
    padding: 60px 0;
}

.about-description {
    color: var(--black-color);
    letter-spacing: 0em;
    font-size: 17px;
}

/* ===============================
   Mission Section
   =============================== */

.mission-section {
    padding: 80px 0;
    background-color: var(--black-color);
}

.mission-description {
    color: var(--light-color);
    letter-spacing: 0em;
    font-size: 17px;
}

/* ===============================
   Team Section
   =============================== */

.team-section {
    background-color: #f8f9fa;
    padding: 60px 0;
}

.team-description {
    color: var(--black-color);
    font-size: 17px;
}

.team-member img {
    height: 334px;
    object-fit: cover;
    width: 100%;
}

/* ===============================
   FAQ Section
   =============================== */

.faq-section {
    padding: 80px 0;
    background-color: var(--black-color);
    color: var(--light-color);
}

.faq-items-container {
    max-width: 1200px;
    margin: 0 auto;
}

.faq-item {
    padding: 40px 0;
}

.faq-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0;
    padding-right: 30px;
}

.faq-description {
    font-size: 1.1rem;
    line-height: 1.6;
    padding-left: 30px;
    position: relative;
}

.faq-description:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: rgba(255,255,255,0.2);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .faq-title {
        font-size: 1.6rem;
        padding-right: 20px;
    }

    .faq-description {
        padding-left: 20px;
    }
}

@media (max-width: 992px) {
    .faq-item {
        padding: 30px 0;
    }

    .faq-title {
        font-size: 1.5rem;
        padding-right: 15px;
    }

    .faq-description {
        padding-left: 15px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .faq-item .row {
        flex-direction: column;
    }

    .faq-title, .faq-description {
        padding: 0;
        text-align: center;
    }

    .faq-description {
        margin-top: 20px;
    }

    .faq-description:before {
        display: none;
    }

    .faq-item {
        padding: 25px 0;
    }
}

/* ===============================
   Contact Section
   =============================== */

.contact-section {
    padding: 80px 0;
}

.contact-section h1 {
    font-size: 4rem;
    text-align: center;
    color: #343a40;
}

.contact-section p {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-form {
    max-width: 800px;
    margin: 50px auto;
}

.form-group {
    margin-bottom: 20px;
}

.contact-description {
    color: var(--black-color);
    letter-spacing: 0em;
    font-size: 17px;
}

.contact-section .form-control {
    border: none;
    border-bottom: 1px solid black;
    padding: 10px;
    width: 100%;
    transition: border-color 0.3s ease;
    border-radius: 0;
    outline: none !important;
    box-shadow: none !important;
}

.contact-section .form-control:focus {
    border-color: var(--black-color);
    box-shadow: none !important;
}

.contact-section .form-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.send-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 55px;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-radius: 25px;
}

.send-button:hover {
    background-color: #031c44b3;
    cursor: pointer;
    color: var(--light-color);
}