/* Reset and Base Styles */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    background-color: #1E305E;
    color: #333;
    line-height: 1.6;
}


/* Hero Section */
.practice-hero-container {
    width: 100%;
    height: 100vh;
    padding-top: 10em;
}

.practice-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.practice-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    width: 90%;
    text-align: center;
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.practice-hero-wrapper {
    height: 300px;
    text-align: center;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(3px);
    border-radius: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.practice-hero-wrapper h2 {
    color: #CD9D49;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.practice-hero-wrapper h1 {
    color: #1E305E;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.scroll-down {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    animation: subtle-bounce 2.5s infinite ease-in-out;
    z-index: 1;
}

.scroll-down img {
    width: 48px;
    height: 48px;
    transition: transform 0.3s ease;
}

.scroll-down:hover img {
    transform: scale(1.1);
}

@keyframes subtle-bounce {
    0%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    50% {
        transform: translateY(-8px) translateX(-50%);
    }
}

/* Practice Areas Section */
.practice-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 4%;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.practice-introduction h2 {
    font-size: 2.8rem;
    color: #1E305E;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 700;
}

.practice-introduction p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    text-align: center;
    margin-bottom: 2rem;
}

.practice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.practice-grid .practice-card:last-child {
    grid-column: 1 / -1; /* Spans all columns */
    justify-self: center; /* Centers the card horizontally */
    max-width: 400px; /* Matches the minimum width of other cards */
}

.practice-card {
    background-color: #F2E4CD;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.practice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.practice-card h3 {
    font-size: 1.8rem;
    color: #1E305E;
    margin-bottom: 1rem;
}

.practice-card p {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 1rem;
}

.practice-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.8rem;
    background-color: #1E305E;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.practice-toggle:hover,
.practice-toggle:focus {
    background-color: #CD9D49;
    outline: none;
}

.practice-toggle .toggle-icon {
    font-size: 1.3rem;
}

.practice-details {
    padding: 0.5rem;
    background-color: #f9f9f9;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.3;
    color: #333;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.practice-details[hidden] {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.practice-details:not([hidden]) {
    max-height: 400px;
    opacity: 1;
}

.practice-details ul {
    list-style: none;
    padding-left: 1rem;
    flex-direction: column;
    align-items:start;
}

.practice-details ul li {
    position: relative;
    margin-bottom: 0.5rem;
}

.practice-details ul li::before {
    content: "•";
    color: #CD9D49;
    position: absolute;
    left: -1rem;
    font-size: 1.2em;
}

.learn-more {
    display: inline-block;
    background-color: #CD9D49;
    color: #fff;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.learn-more:hover,
.learn-more:focus {
    background-color: #1E305E;
    transform: translateY(-2px);
}


/* Responsive Design */

/* Small Devices (320px - 768px) */
@media (min-width: 320px) and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .practice-hero {
        background-image: url('images/practice-background-mobile.png');
        min-height: 70vh;
        padding-top: 80px;
    }

    .practice-hero-content {
        width: 95%;
        padding: 1.5rem;
    }

    .practice-hero-wrapper h2 {
        font-size: 1.8rem;
    }

    .practice-hero-wrapper h1 {
        font-size: 2.8rem;
    }

    .scroll-down {
        display: none;
    }

    .practice-section {
        padding: 3rem 5%;
    }

    .practice-introduction h2 {
        font-size: 2rem;
    }

    .practice-introduction p {
        font-size: 1rem;
    }

    .practice-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .practice-card h3 {
        font-size: 1.5rem;
    }

    .practice-toggle {
        font-size: 1rem;
    }

    .practice-details {
        font-size: 0.9rem;
    }

}

/* Medium Devices (769px - 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .practice-hero {
        background-image: url('images/practice-background-tablet.png');
        min-height: 80vh;
    }

    .practice-hero-content {
        width: 85%;
        padding: 2rem;
    }

    .practice-hero-wrapper h2 {
        font-size: 2rem;
    }

    .practice-hero-wrapper h1 {
        font-size: 3.2rem;
    }

    .scroll-down {
        bottom: 2.5rem;
    }

    .practice-section {
        padding: 4rem 3%;
    }

    .practice-introduction h2 {
        font-size: 2.4rem;
    }

    .practice-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .practice-card h3 {
        font-size: 1.6rem;
    }

}

@media (min-width: 1440px) {
  html, body {
    background-color: #fff; /* Fix blue showing underneath */
  }

  .practice-hero {
    min-height: 100vh;
    height: 100vh; /* Ensures it fills screen */
    background-color: #fff; /* Prevent fallback blue if video fails */
  }

  .practice-hero-content {
    max-width: 1000px;
    padding: 4rem;
  }

  .practice-hero-wrapper {
    width: 60%;
    height: auto;
    padding: 3rem;
  }

  .practice-hero-wrapper h2 {
    font-size: 3rem;
  }

  .practice-hero-wrapper h1 {
    font-size: 4.5rem;
  }

  .practice-section {
    max-width: 1600px;
    padding: 6rem 6%;
  }

  .practice-grid {
    gap: 3rem;
  }

  .practice-card h3 {
    font-size: 2rem;
  }

  .practice-details {
    font-size: 1.1rem;
    line-height: 1.7;
  }

  .learn-more {
    font-size: 1rem;
    padding: 0.7rem 1.4rem;
  }
}

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');