/*
Theme Name: Traub Law Office
Theme URI: https://austinaccidentlawyer.com
Author: Andrew Traub
Author URI: https://austinaccidentlawyer.com
Description: Personal injury law firm theme for The Traub Law Office, P.C. in Austin, TX.
Version: 1.0.0
Text Domain: traub-law
*/

/* ==========================================================================
   Design System & Variables
   ========================================================================== */
:root {
    /* Colors */
    --primary-color: #181266;
    /* Navy Blue */
    --primary-light: #2A2399;
    --primary-dark: #0D0A3D;
    --accent-color: #F5C026;
    /* Gold/Orange */
    --accent-hover: #FFD555;
    --text-main: #334155;
    --text-light: #64748B;
    --bg-main: #FFFFFF;
    --bg-light: #F8FAFC;
    --bg-dark: #0F172A;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    line-height: 1.2;
    margin: 0 0 var(--space-md) 0;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Defaults (Replacing .container) */
body>header,
main section,
body>footer {
    padding: var(--space-2xl) var(--space-md);
    max-width: 1200px;
    margin: 2rem auto;
}

/* ==========================================================================
   Global Button Styling (Progressive Enhancement Contexts)
   ========================================================================== */
#header address a:last-of-type,
#home>header>nav>a,
#about>article>a,
#cta>header>a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    background-color: var(--accent-color);
    color: var(--primary-dark);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

#header address a:last-of-type:hover,
#home>header>nav>a:first-child:hover,
#about>article>a:hover,
#cta>header>a:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.header-cta {
    font-size: 1.125rem;
    padding: 1rem 2rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
body>header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 5%;
    max-width: none;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "logo address"
        "nav nav";
    align-items: center;
    row-gap: 1rem;
}

#logo {
    grid-area: logo;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

#logo img {
    height: 40px;
    width: auto;
}

#logo span span {
    color: var(--accent-color);
}

body>header>nav {
    grid-area: nav;
    justify-self: center;
}

body>header>nav>ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

body>header>nav a {
    color: var(--primary-dark);
    font-weight: 500;
}

body>header>nav a:hover {
    color: var(--accent-color);
}

/* Dropdown Menu — WordPress uses .menu-item-has-children + .sub-menu */
body>header>nav .menu-item-has-children {
    position: relative;
}

body>header>nav .menu-item-has-children>.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: var(--shadow-md);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    padding: var(--space-sm) 0;
    border-radius: 4px;
    z-index: 1001;
}

body>header>nav .menu-item-has-children:hover>.sub-menu,
body>header>nav .menu-item-has-children:focus-within>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body>header>nav .menu-item-has-children>.sub-menu>li>a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-main);
    font-weight: 400;
}

body>header>nav .menu-item-has-children>.sub-menu>li>a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Nested sub-menus — appear to the right of the parent sub-item on hover */
body>header>nav .sub-menu .menu-item-has-children>.sub-menu {
    top: 0;
    left: 100%;
    transform: translateX(10px);
}

body>header>nav .sub-menu .menu-item-has-children:hover>.sub-menu,
body>header>nav .sub-menu .menu-item-has-children:focus-within>.sub-menu {
    transform: translateX(0);
}

body>header>address {
    grid-area: address;
    font-style: normal;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.usp {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    border-right: 2px solid var(--accent-color);
    padding-right: 1.5rem;
}

body>header>address a:nth-of-type(1) {
    font-weight: 700;
    color: var(--primary-color);
}

body>header>button {
    display: none;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
#home {
    max-width: none;
    padding: 0;
    margin-top: 80px;
    background:
        linear-gradient(to right, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.6) 50%, rgba(15, 23, 42, 0.3) 100%),
        url('assets/images/hero_bg.png') center/cover no-repeat;
    color: #fff;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

#home>header {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
    width: 100%;
}

#home>header>p:first-of-type {
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
}

#home h1 {
    font-size: 4rem;
    color: #fff;
    max-width: 650px;
}

#home>header>p:last-of-type {
    font-size: 1.25rem;
    max-width: 650px;
    margin-bottom: 2rem;
}

#home>header>nav {
    display: flex;
    gap: 1rem;
}

#home>header>nav>a:last-child {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

#home>header>nav>a:last-child:hover {
    background-color: #fff;
    color: var(--primary-dark);
}

#home>dl {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: auto 0 0 0;
    display: flex;
    justify-content: space-around;
    padding: 2rem;
}

#home>dl>div {
    text-align: center;
}

#home>dl dd {
    margin: 0;
    color: var(--accent-color);
    font-size: 2.5rem;
    font-weight: 700;
}

#home>dl dt {
    color: #fff;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   Practice Areas
   ========================================================================== */
#practice-areas {
    background-color: var(--bg-light);
    max-width: none;
    padding: 1rem 0;
}

#practice-areas>header,
#practice-areas>ul {
    max-width: 1200px;
    margin: 0 auto;
}

#practice-areas>header {
    text-align: center;
}

#practice-areas>header>p:first-of-type {
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#practice-areas h2 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

#practice-areas h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: 60px;
    background-color: var(--accent-color);
}

#practice-areas>ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

#practice-areas article {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border-top: 4px solid transparent;
}

#practice-areas article:hover {
    transform: translateY(-10px);
    border-top-color: var(--accent-color);
    box-shadow: var(--shadow-hover);
}

#practice-areas article h3 {
    font-size: 1.5rem;
}

#practice-areas article a {
    font-weight: 600;
}

#practice-areas article a:hover {
    text-decoration: underline;
}

.practice-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.practice-icon .material-symbols-outlined {
    font-size: 2rem;
    color: var(--accent-color);
    vertical-align: middle;
}

#practice-areas article h3 {
    display: inline;
    vertical-align: middle;
}

/* ==========================================================================
   About Section
   ========================================================================== */
#about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

#about figure {
    margin: 0;
    position: relative;
    border-radius: 8px;
}

#about figure img {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

#about figcaption {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--accent-color);
    color: var(--primary-dark);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

#about figcaption strong {
    font-size: 2.5rem;
    display: block;
    line-height: 1;
}

#about article>header>p {
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#about h2 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

#about h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 60px;
    background-color: var(--accent-color);
}

#about ul {
    margin: 2rem 0;
    list-style: disc;
    padding-left: 1.5rem;
}

#about li {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* ==========================================================================
   Awards Section
   ========================================================================== */
#awards {
    padding: 1rem 0;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
#cta {
    background: var(--primary-color);
    color: #fff;
    max-width: none;
    text-align: center;
}

#cta h2 {
    color: #fff;
}

#cta p {
    font-size: 1.125rem;
    margin: 0 auto 2rem auto;
    max-width: 600px;
}

/* ==========================================================================
   Credentials Comparison Table
   ========================================================================== */
#credentials {
    background-color: var(--bg-main);
    padding-top: 0;
    padding-bottom: 0;
}

#credentials>header {
    text-align: center;
    margin-bottom: 3rem;
}

#credentials>header>p {
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

#credentials h2 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 0;
}

#credentials h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: 60px;
    background-color: var(--accent-color);
}

.credentials-table-wrap {
    overflow-x: auto;
    padding-bottom: 1rem;
}

#credentials table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

#credentials thead th {
    padding: 1rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--primary-dark);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    white-space: nowrap;
}

#credentials thead .col-traub {
    background-color: var(--primary-dark);
    color: #fff;
    border: 3px solid var(--primary-color);
    border-bottom: none;
}

#credentials tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#credentials tbody tr:last-child {
    border-bottom: none;
}

#credentials tbody td {
    padding: 1.5rem 1rem;
    vertical-align: middle;
    text-align: center;
}

#credentials tbody .col-traub {
    background-color: rgba(24, 18, 102, 0.04);
    border-left: 3px solid var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

#credentials tbody tr:last-child .col-traub {
    border-bottom: 3px solid var(--primary-color);
}

.credential-info {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    text-align: left !important;
}

/* Badge sprites — ported from austinaccidentlawyer/css/screen.css.
   Single CSS sprite (awards-banner-normal.webp) split into fixed-size
   background-position slices per badge variant. */
#credentials .sprite {
    background: url('assets/images/awards-banner-normal.webp') no-repeat top left;
    display: inline-block;
    width: 74px;
    height: 74px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

#credentials .sprite .screen-reader-text {
    position: absolute;
    left: -200vw;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#credentials .sprite.super-lawyers {
    background-position: 0 0;
    width: 92px;
    height: 77px;
}

#credentials .sprite.top-one-percent-badge-2022 {
    background-position: -96px 0;
    width: 74px;
}

#credentials .sprite.Lawyers_f_istinction_144 {
    background-position: -174px 0;
    width: 85px;
}

#credentials .sprite.multi-milliondollaradvocates {
    background-position: -263px 0;
    width: 74px;
}

#credentials .sprite.NTL-top-100-member-seal {
    background-position: -341px 0;
    width: 77px;
    height: 77px;
}

#credentials .sprite.jurry-verdict-top-100-2018 {
    background-position: -422px 0;
    width: 75px;
}

#credentials .sprite.avvo {
    background-position: -501px 0;
    width: 77px;
    height: 61px;
}

#credentials .sprite.best_otorcycle_ccident_awyer_n_ustin {
    background-position: -582px 0;
    width: 74px;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #credentials .sprite {
        background-image: url('assets/images/awards-banner.webp');
        background-size: 660px 77px;
    }
}

.credential-info strong {
    display: block;
    color: var(--primary-dark);
    font-size: 1rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.credential-info p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

.credential-info .aside {
    font-weight: 400;
    color: var(--text-light);
}

.check {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.uncheck {
    font-size: 1.75rem;
    color: #ccc;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
#testimonials {
    background-color: var(--primary-dark);
    color: #fff;
    max-width: 100%;
    padding: 1rem 0;
}

#testimonials>header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 var(--space-md);
}

#testimonials h2 {
    color: #fff;
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

#testimonials h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: 60px;
    background-color: var(--accent-color);
}

.carousel-container {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2rem;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    padding: 0 5vw;
}

.testimonial-slide {
    background: #fff;
    color: var(--text-main);
    border-radius: 8px;
    padding: 2.5rem;
    flex: 0 0 400px;
    max-width: 80vw;
    scroll-snap-align: center;
    box-shadow: var(--shadow-md);
    margin: 0;
    display: flex;
    flex-direction: column;
}

.testimonial-slide blockquote {
    margin: 0 0 1.5rem 0;
    font-size: 1.125rem;
    font-style: italic;
    line-height: 1.6;
    flex-grow: 1;
}

.testimonial-slide .rating {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-slide figcaption {
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
}

.testimonial-slide figcaption strong {
    color: var(--primary-dark);
    font-size: 1.125rem;
}

.testimonial-slide figcaption .source {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
}

.testimonial-slide figcaption time {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.see-more-reviews {
    text-align: center;
    margin: 2rem 0 0 0;
    padding: 0 var(--space-md);
}

.see-more-reviews a {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.see-more-reviews a:hover {
    color: var(--accent-hover);
}

/* JS Carousel Buttons (Progressive Enhancement) */
#testimonials {
    position: relative;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    color: var(--primary-dark);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.carousel-btn:hover {
    background: #fff;
    color: var(--accent-color);
    box-shadow: var(--shadow-hover);
}

.carousel-btn.prev-btn {
    left: 20px;
}

.carousel-btn.next-btn {
    right: 20px;
}

#testimonials.has-js-carousel:hover .carousel-btn {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
#faq {
    background-color: var(--bg-light);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

#faq>header {
    text-align: center;
    margin-bottom: 3rem;
}

#faq h2 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

#faq h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: 60px;
    background-color: var(--accent-color);
}

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

.faq-container details {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-container summary {
    padding: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color var(--transition-fast);
}

.faq-container summary::-webkit-details-marker {
    display: none;
}

.faq-container summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 400;
    transition: transform var(--transition-fast);
}

.faq-container details[open] summary::after {
    content: '-';
    transform: rotate(180deg);
}

.faq-container details[open] summary {
    background-color: var(--bg-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-container details p {
    padding: 1.5rem;
    margin: 0;
    color: var(--text-main);
    line-height: 1.6;
}

/* ==========================================================================
   Recent Articles
   ========================================================================== */
#recent-articles {
    background-color: var(--bg-main);
    padding-top: 0;
    padding-bottom: 0;
}

#recent-articles>header {
    text-align: center;
    margin-bottom: 3rem;
}

#recent-articles h2 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

#recent-articles h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: 60px;
    background-color: var(--accent-color);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.article-content h3 a {
    color: var(--primary-dark);
}

/* Block Link Pattern: Make entire card clickable via the title link */
.article-content h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.article-content time {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.article-content p {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.article-content .read-more {
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0;
}

.article-card:hover .read-more {
    text-decoration: underline;
    color: var(--accent-color);
}

/* ==========================================================================
   Footer
   ========================================================================== */
body>footer {
    background: var(--primary-dark);
    color: #fff;
    max-width: none;
    padding: var(--space-xl) var(--space-md);
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 4rem;
}

.footer-map h2 {
    color: #fff;
    font-size: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.footer-map h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-color);
}

.footer-map iframe {
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.footer-map address {
    color: var(--text-light);
    font-style: normal;
    margin-bottom: 1rem;
}

.directions-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: var(--primary-dark);
    font-weight: 600;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.directions-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

body>footer h2 {
    color: #fff;
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

body>footer h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-color);
}

body>footer>nav ul li,
body>footer>address ul li {
    margin-bottom: 0.75rem;
}

body>footer>nav a,
body>footer>address a,
body>footer>address {
    color: var(--text-light);
    font-style: normal;
}

body>footer>nav a:hover,
body>footer>address a:hover {
    color: var(--accent-color);
}

.footer-contact .socials {
    margin-top: 2rem;
}

#footer-logo {
    display: block;
    margin-bottom: 1rem;
}

#footer-logo img {
    height: 50px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.socials nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.socials nav a {
    color: #fff;
    text-decoration: underline;
}

body>footer>p {
    grid-column: 1 / -1;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

body>footer>p a {
    color: var(--text-light);
    text-decoration: underline;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    body>header {
        grid-template-areas:
            "logo logo"
            "address address"
            "nav nav";
        justify-items: center;
        text-align: center;
    }

    body>header>address {
        justify-content: center;
        width: 100%;
        border-top: 1px solid var(--bg-light);
        padding-top: 1rem;
    }
}

@media (max-width: 992px) {
    #about {
        grid-template-columns: 1fr;
    }

    #about figure {
        max-width: 600px;
        margin: 0 auto;
    }

    body>footer {
        grid-template-columns: 1fr 1fr;
    }

    .footer-map {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    body>header {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo menu"
            "address address";
        padding: 1rem;
    }

    #logo {
        grid-area: logo;
    }

    body>header>.mobile-menu-btn {
        grid-area: menu;
        display: block;
        background: none;
        border: none;
        color: var(--primary-color);
        font-size: 1.5rem;
        cursor: pointer;
    }

    body>header>nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        display: none;
        z-index: 1002;
    }

    body>header>nav.active {
        display: block;
    }

    body>header>nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    body>header>address {
        grid-area: address;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--bg-light);
        width: 100%;
    }

    .usp {
        border-right: none;
        padding-right: 0;
        text-align: center;
        font-size: 0.8rem;
    }

    body>header>address a:nth-of-type(1) {
        font-size: 1.1rem;
    }

    body>header>address .header-cta {
        width: 100%;
        max-width: 300px;
    }

    #home h1 {
        font-size: 2.5rem;
    }

    #home>header>nav {
        flex-direction: column;
    }
}

@media (max-width: 639px) {
    body>footer {
        grid-template-columns: 1fr;
    }

    .footer-map {
        grid-column: auto;
    }
}

/* ==========================================================================
   Inner Page Layout — Article + Sidebar
   ========================================================================== */

/* Page Hero (replaces the main hero for inner pages) */
.page-hero {
    background:
        linear-gradient(to right, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.6) 100%),
        url('assets/images/hero_bg.png') center / cover no-repeat;
    padding: 12rem 1rem 3rem;
    margin-top: 0;
}

.page-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb li+li::before {
    content: '›';
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.breadcrumb a:hover {
    color: var(--accent-color);
}

.breadcrumb [aria-current="page"] {
    color: var(--accent-color);
    font-weight: 600;
}

/* Two-Column Page Layout */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
    align-items: start;
}

/* Front page: full-width, no sidebar. Top padding clears the fixed header
   (same approach .page-hero uses — the fixed header overlaps the viewport top). */
.home-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10rem 1rem 3rem;
}

.home-article > header h1 {
    font-size: 2.25rem;
    line-height: 1.2;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

/* If the first block is the hero (#home), it sets its own margin-top to clear
   the header, so drop our wrapper's top padding to avoid a double gap. */
.home-main:has(#home:first-of-type) {
    padding-top: 0;
}

@media (max-width: 768px) {
    .home-main {
        padding-top: 12rem;
    }

    .home-main:has(#home:first-of-type) {
        padding-top: 0;
    }
}

/* Article Content */
.page-article article {
    background: #fff;
}

.page-article header img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.page-article h1 {
    font-size: 2.25rem;
    line-height: 1.2;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.article-meta {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.article-meta a {
    color: var(--primary-color);
    font-weight: 600;
}

.page-article h2 {
    font-size: 1.625rem;
    color: var(--primary-dark);
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-light);
}

.page-article p {
    color: var(--text-main);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.page-article ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.page-article li {
    color: var(--text-main);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.article-footer {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 6px 6px 0;
    margin-bottom: 3rem;
}

.article-footer p {
    margin: 0;
    font-weight: 500;
}

.article-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

/* About the Author Block */
.about-author {
    margin-top: 3rem;
    padding: 2.5rem;
    background-color: #f1f1f1;
    border-radius: 16px;
}

.about-author h3 {
    margin: 0 0 1.25rem 0;
    font-size: 1.75rem;
    color: var(--primary-dark);
    font-family: var(--font-heading);
}

.author-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.author-content img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.author-bio p {
    margin: 0 0 0.75rem 0 !important;
    font-size: 1.1rem !important;
    color: var(--text-main) !important;
    line-height: 1.5 !important;
}

.author-links {
    margin-top: 0.5rem;
    font-weight: 500;
}

.author-links a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.author-links a:hover {
    color: var(--accent-color);
}

/* Sidebar */
.page-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 120px;
}

.page-sidebar section {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.page-sidebar h2 {
    font-size: 1.125rem;
    color: #fff;
    background: var(--primary-dark);
    padding: 0.875rem 1.25rem;
    margin: 0;
}

/* Sidebar Widgets */
.sidebar-cta {
    border-top: 4px solid var(--accent-color);
}

.sidebar-cta p {
    padding: 1rem 1.25rem 0;
    font-size: 0.95rem;
}

.sidebar-cta a {
    display: block;
    margin: 1rem 1.25rem 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--accent-color);
    color: var(--primary-dark);
    font-weight: 700;
    text-align: center;
    border-radius: 4px;
}

.sidebar-related ul {
    list-style: none;
    padding: 0;
}

.sidebar-related li {
    border-bottom: 1px solid var(--bg-light);
}

.sidebar-related a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-main);
    font-weight: 500;
}

.sidebar-related .material-symbols-outlined {
    font-size: 1.25rem;
    color: var(--accent-color);
}

.sidebar-articles li {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--bg-light);
}

.sidebar-articles a {
    display: flex;
    gap: 0.75rem;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.sidebar-articles img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.sidebar-articles span {
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-articles time {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Responsive Overrides */
@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr;
    }

    .page-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding-top: 15rem;
    }
}

/* Article Tags */
.article-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bg-light);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.article-tags span {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

.article-tags a {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.article-tags a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
