/* Updated Style.css for Digitalbank */

:root {
  --primary-dark-blue: hsl(233, 26%, 24%);
  --primary-lime-green: hsl(136, 64%, 51%);
  --primary-bright-cyan: hsl(192, 69%, 51%);
  --neutral-grayish-blue: hsl(233, 8%, 62%);
  --neutral-light-grayish-blue: hsl(220, 16%, 96%);
  --neutral-very-light-gray: hsl(0, 0%, 98%);
  --neutral-white: hsl(0, 0%, 100%);
}

body.dark-mode {
  --primary-dark-blue: hsl(0, 0%, 100%);
  --primary-lime-green: hsl(136, 64%, 51%);
  --primary-bright-cyan: hsl(192, 69%, 51%);
  --neutral-grayish-blue: hsl(220, 16%, 76%);
  --neutral-light-grayish-blue: hsl(233, 26%, 16%);
  --neutral-very-light-gray: hsl(233, 26%, 12%);
  --neutral-white: hsl(233, 26%, 20%);
}

body {
    overflow-x: hidden;
    margin: 0;
    font-family: 'Public Sans', sans-serif;
    font-size: 18px;
    color: var(--neutral-grayish-blue);
    background-color: var(--neutral-very-light-gray);
    scroll-behavior: smooth;
    animation: fadeIn 0.8s ease-in-out;
    transition: background-color 0.4s ease, color 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Animations */
.slide-up-anim {
    animation: slideUp 0.8s ease-out forwards;
    opacity: 0;
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-dark-blue);
    font-weight: 400;
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    background-color: var(--neutral-white);
    position: relative;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Modern shadow */
    transition: background-color 0.4s ease;
}

.theme-toggle {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--primary-dark-blue);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.4s ease;
}
.theme-toggle:hover {
    transform: scale(1.1);
    color: var(--primary-lime-green);
}

.navbar-brand img {
    height: 24px;
    transition: transform 0.3s ease;
}
.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav {
    gap: 1.5rem;
}

.navbar-nav .nav-link {
    color: var(--neutral-grayish-blue);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 1rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-dark-blue);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-lime-green), var(--primary-bright-cyan));
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.nav-btn {
    background: linear-gradient(to right, var(--primary-lime-green), var(--primary-bright-cyan));
    color: var(--neutral-white);
    border: none;
    padding: 0.8rem 2.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(50, 205, 50, 0.2);
}

.nav-btn:hover {
    opacity: 0.85;
    color: var(--neutral-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(50, 205, 50, 0.3);
}

/* Hero Section */
.hero {
    background-color: var(--neutral-very-light-gray);
    position: relative;
    padding: 4rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-right: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--neutral-grayish-blue);
}

.hero-images {
    position: relative;
    min-height: 500px;
}

/* The background pattern for desktop */
.bg-pattern {
    position: absolute;
    top: -20%;
    left: 10%;
    width: 150%;
    z-index: 0;
    object-fit: cover;
}

/* Mockups container */
.mockups {
    position: absolute;
    top: -10%;
    right: -20%;
    width: 120%;
    z-index: 1;
    transform: translateY(5%);
    transition: transform 0.5s ease-out;
}
.hero-images:hover .mockups {
    transform: translateY(0%);
}

/* Features Section (Third Section) */
.third-section {
    background-color: var(--neutral-light-grayish-blue);
    padding: 6rem 0;
    position: relative;
    z-index: 2;
    transition: background-color 0.4s ease;
}

.third-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.section-description {
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 650px;
    margin-bottom: 4rem;
}

.feature {
    transition: transform 0.3s ease;
}
.feature:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 1.75rem;
    transition: transform 0.4s ease;
}
.feature:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Articles Section */
.articles-section {
    background-color: var(--neutral-very-light-gray);
    padding: 6rem 0;
    transition: background-color 0.4s ease;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.card {
    background-color: var(--neutral-white);
    border-radius: 10px;
    overflow: hidden;
    transition: background-color 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.card:hover .card-img-top {
    transform: scale(1.05);
}

/* overflow hidden to prevent image scaling outside */
.card-img-wrapper {
    overflow: hidden;
}

.card-body {
    padding: 2rem 1.5rem;
}

.card-title {
    font-size: 1.2rem;
    margin: 0.75rem 0;
    transition: color 0.3s ease;
    font-weight: 500;
}

.card:hover .card-title {
    color: var(--primary-lime-green);
}

.card-text {
    font-size: 0.95rem;
}

/* Footer Section */
.footer-section {
    background-color: var(--primary-dark-blue);
    padding: 4rem 0;
}

.footer-logo img {
    height: 24px;
    margin-bottom: 3rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a img {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.social-icons a:hover img {
    filter: brightness(0) saturate(100%) invert(64%) sepia(55%) saturate(386%) hue-rotate(85deg) brightness(94%) contrast(92%); /* Turns icon to primary-lime-green */
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--neutral-white);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-lime-green);
}

.footer-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    height: 100%;
    justify-content: space-between;
}

.copyright {
    color: var(--neutral-grayish-blue);
    font-size: 0.95rem;
    margin-top: 2rem;
    margin-bottom: 0;
}


/* Responsive Adjustments */
@media (max-width: 991px) {
    .hero {
        text-align: center;
        padding-bottom: 0;
        min-height: auto;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 4rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-images {
        min-height: 400px;
        width: 100%;
        display: flex;
        justify-content: center;
        overflow: hidden;
    }

    .bg-pattern {
        width: 100%;
        top: -10%;
        left: 0;
        content: url('./images/bg-intro-mobile.svg');
        object-fit: contain;
    }

    .mockups {
        width: 90%;
        max-width: 450px;
        right: auto;
        top: -15%;
        position: relative;
    }

    .navbar-collapse {
        background-color: var(--neutral-white);
        position: absolute;
        top: 100%;
        left: 5%;
        right: 5%;
        padding: 2rem;
        border-radius: 10px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        text-align: center;
        margin-top: 1rem;
        transition: background-color 0.4s ease;
    }
    
    .navbar-nav .nav-link {
        color: var(--primary-dark-blue);
        font-size: 1.1rem;
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }

    .footer-cta {
        align-items: center;
        margin-top: 2rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-logo img {
        margin: 0 auto 2rem;
        display: block;
    }
    
    .social-icons {
        justify-content: center;
        margin-bottom: 2rem;
    }
    
    .third-section, .articles-section {
        text-align: center;
    }
    
    .third-section .feature {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}