/*
WordPress-specific styles for LedgerLabs Theme
This file contains styles specific to WordPress functionality
that are not found in the base CDN CSS files.

This file maximizes reuse of styles from CDN by leveraging existing CSS custom properties, utility classes, and animations.
*/

/* Sticky Footer - Make footer always stick to bottom */
html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content area takes up remaining space, pushing footer to bottom */
.site-main {
    flex: 1 0 auto;
    width: 100%;
}

/* Footer stays at bottom */
footer {
    flex-shrink: 0;
}

/* WordPress Theme Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    box-shadow: var(--shadow-md);
    border: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.site-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.site-branding {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -0.025em;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.site-title:hover {
    color: white;
    transform: translateY(-1px);
}

.site-title img {
    vertical-align: middle;
    margin-right: 0.5rem;
}

.site-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.2;
    font-weight: 400;
}

/* WordPress Navigation */
.main-navigation {
    position: relative;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
}

.main-navigation .nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
}

.main-navigation .nav-item {
    position: relative;
}

.main-navigation .nav-link,
.navbar .nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    height: 100%;
    min-height: 48px;
}

.main-navigation .nav-link:hover,
.navbar .nav-link:hover,
.navbar-nav .nav-link:hover {
    color: white;
    transform: none;
    background-color: transparent;
}

/* Dropdown Menu Styles */
:root {
    --bs-dropdown-link-color: #4a5568;
    --bs-dropdown-link-hover-color: var(--primary-color);
    --bs-dropdown-link-hover-bg: rgba(145, 152, 204, 0.1);
}

.main-navigation .dropdown,
.navbar .dropdown,
.navbar-nav .dropdown {
    position: relative;
}

.main-navigation .dropdown::before,
.navbar .dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 5px;
    background: transparent;
    z-index: 999;
    pointer-events: none;
}

.main-navigation .dropdown-toggle::after,
.navbar .dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.4rem;
    vertical-align: 0.2em;
    border-top: 0.25em solid;
    border-right: 0.25em solid transparent;
    border-bottom: 0;
    border-left: 0.25em solid transparent;
    transition: transform 0.15s ease;
    opacity: 0.8;
}

.main-navigation .dropdown:hover .dropdown-toggle::after,
.navbar .dropdown:hover .dropdown-toggle::after,
.navbar-nav .dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.main-navigation .dropdown-menu,
.navbar .dropdown-menu,
.navbar-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none !important;
    min-width: 200px;
    padding: 0.5rem 0;
    margin: 0;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    transition-delay: 0.2s;
    list-style: none;
}

.main-navigation .dropdown:hover .dropdown-menu,
.navbar .dropdown:hover .dropdown-menu,
.navbar-nav .dropdown:hover .dropdown-menu {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.main-navigation .dropdown-item {
    position: relative;
    display: flex;
    align-items: center;
    color: #4a5568 !important;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
}

.main-navigation .dropdown-item:hover {
    color: var(--primary-color) !important;
}

.main-navigation .dropdown-item .nav-link {
    color: #4a5568 !important;
    padding: 0.75rem 1.25rem;
    border-radius: 0;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    width: 100%;
    font-weight: 400;
    font-size: 0.875rem;
    min-height: 44px;
}

.main-navigation .dropdown-item .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(145, 152, 204, 0.1) !important;
    transform: none;
}

/* More specific selectors to override Bootstrap */
.navbar .dropdown-menu .dropdown-item a,
.navbar .dropdown-menu .dropdown-item .nav-link,
.main-navigation .dropdown-menu .dropdown-item a,
.main-navigation .dropdown-menu .dropdown-item .nav-link {
    color: #4a5568 !important;
}

.navbar .dropdown-menu .dropdown-item a:hover,
.navbar .dropdown-menu .dropdown-item .nav-link:hover,
.main-navigation .dropdown-menu .dropdown-item a:hover,
.main-navigation .dropdown-menu .dropdown-item .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Even more specific Bootstrap overrides */
.dropdown-menu .dropdown-item {
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
}

.dropdown-menu .dropdown-item,
.dropdown-menu .dropdown-item a,
.dropdown-menu .dropdown-item .nav-link {
    color: #4a5568 !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item a:hover,
.dropdown-menu .dropdown-item .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Ultimate override for any remaining white text */
.navbar .dropdown-menu a,
.navbar .dropdown-menu .nav-link,
.main-navigation .dropdown-menu a,
.main-navigation .dropdown-menu .nav-link,
.dropdown-menu a,
.dropdown-menu .nav-link {
    color: #4a5568 !important;
}

.navbar .dropdown-menu a:hover,
.navbar .dropdown-menu .nav-link:hover,
.main-navigation .dropdown-menu a:hover,
.main-navigation .dropdown-menu .nav-link:hover,
.dropdown-menu a:hover,
.dropdown-menu .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 20px;
    height: 16px;
}

.menu-toggle-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.menu-toggle-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .main-navigation .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-5px);
        transition: all 0.2s ease;
    }
    
    .main-navigation.active .nav-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .main-navigation .nav-item,
    .navbar .nav-item,
    .navbar-nav .nav-item {
        width: 100%;
    }
    
    .main-navigation .dropdown,
    .navbar .dropdown,
    .navbar-nav .dropdown {
        position: static;
        width: 100%;
    }
    
    .main-navigation .nav-link,
    .navbar .nav-link,
    .navbar-nav .nav-link {
        color: #4a5568;
        padding: 0.75rem 1.25rem;
        border-radius: 0;
        width: 100%;
        justify-content: flex-start;
        font-weight: 400;
    }
    
    /* Remove hover styles for main menu items on mobile */
    .main-navigation .nav-link:hover,
    .navbar .nav-link:hover,
    .navbar-nav .nav-link:hover {
        color: #4a5568;
        background-color: transparent;
        transform: none;
    }
    
    .main-navigation .dropdown-menu,
    .navbar .dropdown-menu,
    .navbar-nav .dropdown-menu {
        position: static !important;
        display: none;
        opacity: 1;
        transform: none;
        box-shadow: none;
        border: none;
        background: white;
        margin: 0 0 0.5rem 0;
        padding: 0;
        border-radius: 6px;
        top: auto;
        left: auto;
        right: auto;
    }
    
    .main-navigation .dropdown.active .dropdown-menu,
    .navbar .dropdown.active .dropdown-menu,
    .navbar-nav .dropdown.active .dropdown-menu {
        display: block !important;
    }
    
    /* Remove hover from dropdown-item li element on mobile - override all desktop styles */
    .main-navigation .dropdown-item:hover,
    .navbar .dropdown-item:hover,
    .navbar-nav .dropdown-item:hover,
    .main-navigation .dropdown-menu .dropdown-item:hover,
    .navbar .dropdown-menu .dropdown-item:hover,
    .navbar-nav .dropdown-menu .dropdown-item:hover,
    .dropdown-menu .dropdown-item:hover {
        color: inherit !important;
        background-color: transparent !important;
    }
    
    /* Make dropdown-item li take full width and remove any padding/margin */
    .main-navigation .dropdown-item,
    .navbar .dropdown-item,
    .navbar-nav .dropdown-item {
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .main-navigation .dropdown-item .nav-link,
    .navbar .dropdown-item .nav-link,
    .navbar-nav .dropdown-item .nav-link {
        color: #4a5568 !important;
        padding-left: 2rem;
        padding-right: 1.25rem;
        font-size: 0.875rem;
        width: 100%;
        display: block;
    }
    
    /* Only apply hover to the nav-link, not the li - override all desktop hover styles */
    .main-navigation .dropdown-item .nav-link:hover,
    .navbar .dropdown-item .nav-link:hover,
    .navbar-nav .dropdown-item .nav-link:hover,
    .main-navigation .dropdown-menu .dropdown-item .nav-link:hover,
    .navbar .dropdown-menu .dropdown-item .nav-link:hover,
    .navbar-nav .dropdown-menu .dropdown-item .nav-link:hover,
    .dropdown-menu .dropdown-item .nav-link:hover {
        color: var(--primary-color) !important;
        background-color: rgba(145, 152, 204, 0.1) !important;
    }
    
    .main-navigation .dropdown-toggle::after {
        margin-left: auto;
        transform: rotate(-90deg);
    }
    
    .main-navigation .dropdown.active .dropdown-toggle::after {
        transform: rotate(0deg);
    }
}

/* Main content */
.site-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    background: var(--light-bg);
    padding: 2rem;
}

/* WordPress-specific card styling - reuses existing card styles */
.post-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card .entry-content {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.post-card .entry-footer {
    margin-top: auto;
}

/* Apply existing card hover effects and animations */
.post-card:hover {
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-1px) !important;
}

/* Add animation classes for WordPress elements */
.post-card {
    /* Reuse existing animation utilities */
    transition: all 0.3s ease;
}

.post-card.fade-in {
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

.post-card.fade-in-up {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease-out forwards;
}

/* Entry Meta Styling */
.entry-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.entry-meta i {
    color: var(--primary-color);
}

/* Entry Thumbnail */
.entry-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    transition: transform 0.3s ease;
}

.entry-thumbnail img:hover {
    transform: scale(1.02);
}

/* Tags Styling */
.entry-tags .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-sm);
}

/* Social Sharing */
.social-sharing {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.social-sharing .btn-group {
    display: inline-flex;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.social-sharing .btn-group .btn {
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    /* Reuse existing button transition */
    transition: var(--btn-transition);
}

.social-sharing .btn-group .btn:first-child {
    border-top-left-radius: var(--border-radius-sm);
    border-bottom-left-radius: var(--border-radius-sm);
}

.social-sharing .btn-group .btn:last-child {
    border-top-right-radius: var(--border-radius-sm);
    border-bottom-right-radius: var(--border-radius-sm);
    border-right: none;
}

.social-sharing .btn-group .btn:hover {
    /* Reuse existing button hover effects */
    transform: var(--btn-hover-transform);
    box-shadow: var(--btn-hover-shadow);
}

/* Posts Navigation */
.posts-navigation {
    margin-top: 2rem;
}

.posts-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.posts-navigation .nav-previous,
.posts-navigation .nav-next {
    flex: 1;
}

.posts-navigation .nav-previous {
    text-align: left;
}

.posts-navigation .nav-next {
    text-align: right;
}

.posts-navigation a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    /* Reuse existing button base styles */
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: var(--btn-transition);
    border: none;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.posts-navigation a:hover {
    transform: var(--btn-hover-transform);
    box-shadow: var(--btn-hover-shadow);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    color: white;
    text-decoration: none;
}

.posts-navigation a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Comments Section */
.comments-area {
    margin-top: 2rem;
}

.comments-area .card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

/* Modern Footer Styles - Tailwind CSS Support */

footer .border-t {
    border-top-width: 1px;
}




footer .mx-auto {
    margin-left: auto;
    margin-right: auto;
}

footer .max-w-7xl {
    max-width: 80rem;
}

footer .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

footer .py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (min-width: 640px) {
    footer [class*="sm:px-6"] {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    footer [class*="lg:space-y-16"] > * + * {
        margin-top: 4rem;
    }
    
    footer [class*="lg:px-8"] {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

footer .grid {
    display: grid;
}

footer .grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

footer .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

footer .gap-8 {
    gap: 2rem;
}

footer .gap-12 {
    gap: 3rem;
}

@media (min-width: 640px) {
    footer [class*="sm:grid-cols-4"] {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    footer [class*="lg:grid-cols-12"] {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
    
    footer [class*="lg:col-span-4"] {
        grid-column: span 4 / span 4;
    }
    
    footer [class*="lg:col-span-8"] {
        grid-column: span 8 / span 8;
    }
}

footer .mb-4 {
    margin-bottom: 1rem;
}

footer .mb-3 {
    margin-bottom: 0.75rem;
}

footer .mt-4 {
    margin-top: 1rem;
}

footer .mt-6 {
    margin-top: 1.5rem;
}

footer .mt-12 {
    margin-top: 3rem;
}

footer .h-8 {
    height: 2rem;
}

footer .w-5 {
    width: 1.25rem;
}

footer .h-5 {
    height: 1.25rem;
}

footer .text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

footer .text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

footer .text-gray-400 {
    color: var(--text-muted);
}

footer .text-gray-600 {
    color: var(--primary-color);
}

footer .text-gray-900 {
    color: var(--text-dark);
}

footer .leading-relaxed {
    line-height: 1.625;
}

footer .uppercase {
    text-transform: uppercase;
}

footer .tracking-wider {
    letter-spacing: 0.05em;
}

footer .font-semibold {
    font-weight: 600;
}

footer .flex {
    display: flex;
}

footer .gap-4 {
    gap: 1rem;
}

footer .transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

footer .transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

footer .duration-200 {
    transition-duration: 200ms;
}

footer [class*="hover:text-gray-600"]:hover {
    color: var(--primary-color);
}

footer [class*="hover:text-gray-900"]:hover {
    color: var(--text-dark);
}

footer .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (min-width: 1024px) {
    footer [class*="lg:col-span-2"] {
        grid-column: span 2 / span 2;
    }
}

footer .not-italic {
    font-style: normal;
}

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

footer .flex {
    display: flex;
}

footer .flex-col {
    flex-direction: column;
}

@media (min-width: 640px) {
    footer [class*="sm:flex-row"] {
        flex-direction: row;
    }
}

footer .justify-between {
    justify-content: space-between;
}

footer .items-center {
    align-items: center;
}

footer .gap-4 {
    gap: 1rem;
}

footer .gap-3 {
    gap: 0.75rem;
}

footer .block {
    display: block;
}

/* Footer link styling */
footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: none;
}

/* Language switcher - General styles */
.language-switcher {
    display: flex;
    align-items: center;
}

.language-switcher select {
    font-size: 0.875rem;
    color: var(--text-muted);
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    border-radius: 6px;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    min-width: 120px;
    margin-right:53px;
}

.language-switcher select:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.language-switcher select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
}

.language-switcher select option {
    background-color: var(--primary-text-color);
    color: var(--text-dark);
    padding: 0.5rem;
}

/* Footer language switcher alignment */
footer .language-switcher {
    display: flex;
    align-items: center;
}

footer .flex-shrink-0 {
    flex-shrink: 0;
}

footer .border-t {
    border-top-width: 1px;
}

footer .footer-bottom-gradient {
    background-color: var(--primary-color);
}

footer .py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

footer .footer-bottom-gradient .text-white {
    color: var(--primary-text-color);
}



footer .footer-bottom-gradient .opacity-50 {
    opacity: 0.5;
}

/* Footer description text alignment */
footer [class*="lg:col-span-4"] > p {
    text-align: left;
}

/* Language switcher styling in footer bottom bar */


footer .footer-bottom-gradient .language-switcher select {
    background-color: hsl(var(--primary-color) / 0.1);
    border-color: hsl(var(--primary-color) / 0.3);
    color: var(--primary-text-color);
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
}

footer .footer-bottom-gradient .language-switcher select:hover {
    background-color: hsl(var(--primary-color) / 0.2);
    border-color: hsl(var(--primary-color) / 0.5);
}

footer .footer-bottom-gradient .language-switcher select:focus {
    outline: none;
    border-color: hsl(var(--primary-color) / 0.4);
    box-shadow: 0 0 0 2px hsl(var(--primary-color) / 0.2);
}

/* Dropdown options need light background for visibility */
footer .footer-bottom-gradient .language-switcher select option {
    background-color: var(--primary-text-color);
    color: var(--text-dark);
    padding: 0.5rem;
}

/* Align first link items with address in Legal section */
footer [class*="lg:col-span-8"] > div {
    display: flex;
    flex-direction: column;
}

/* Ensure headings and company name have consistent spacing and height */
footer [class*="lg:col-span-8"] > div h3 {
    margin-bottom: 0.75rem; /* mb-3 to match company name spacing */
    line-height: 1.25;
    font-size: 0.875rem;
    height: 1.25rem; /* Match line-height exactly */
    display: flex;
    align-items: center;
}

footer [class*="lg:col-span-8"] > div ul {
    margin-top: 0;
    padding-top: 0;
}

/* Ensure Legal section company name aligns with headings */
footer [class*="lg:col-span-8"] > div:last-child strong {
    line-height: 1.25;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    height: 1.25rem; /* Match heading height exactly */
    display: flex;
    align-items: center;
}

/* Align first link items with address - ensure they start at same position */
footer [class*="lg:col-span-8"] > div ul li:first-child,
footer [class*="lg:col-span-8"] > div:last-child address {
    margin-top: 0;
    padding-top: 0;
}

/* Match spacing between list items with address line-height */
footer .footer-links-list {
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

footer .footer-links-list li {
    margin: 0;
    padding: 0;
    line-height: 1.5;
    display: block;
    min-height: 1.3125rem; /* Match line-height: 0.875rem * 1.5 */
}

footer .footer-links-list li a {
    line-height: 1.5;
    display: inline-block;
    vertical-align: top;
}

/* Calculate spacing to match address line-height: line-height creates natural spacing */
/* With line-height 1.5 and font-size 0.875rem, each line takes 1.3125rem */
/* So spacing between items should be 0 to match consecutive address lines */
footer .footer-links-list li + li {
    margin-top: 0;
}

/* Match address line-height exactly with list items */
footer .footer-address {
    line-height: 1.5;
    font-size: 0.875rem; /* text-sm - must match list items */
    margin: 0;
    padding: 0;
    display: block;
}

/* Ensure address lines align with list items - br creates line-height spacing */
footer .footer-address br {
    line-height: 1.5;
}

/* Footer contact info (phone and email) */
footer .footer-contact-info {
    margin-top: 0.75rem; /* mt-3 */
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Closer together */
}

footer .footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.5;
    font-size: 0.875rem; /* text-sm - match address */
}

footer .footer-contact-icon {
    width: 1rem; /* 16px */
    height: 1rem; /* 16px */
    flex-shrink: 0;
    color: currentColor;
    opacity: 0.7;
}

footer .footer-contact-item a {
    line-height: 1.5;
    display: inline-block;
}

/* Responsive adjustments for footer */
@media (max-width: 640px) {

    
    footer .grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    footer .gap-12 {
        gap: 2rem;
    }
    
    footer .mt-12 {
        margin-top: 2rem;
    }
    
    /* Center logo on mobile */
    footer .footer-logo-container {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    
    footer .footer-logo-container img {
        margin: 0 auto;
    }
    
    /* Center description text on mobile */
    footer [class*="lg:col-span-4"] > p {
        text-align: justify;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Center social media icons on mobile */
    footer .footer-social-icons {
        justify-content: center;
    }
    
    /* Bottom bar mobile - center everything */
    footer .footer-bottom-gradient [class*="flex-col"] {
        justify-content: center !important;
        align-items: center !important;
        text-align: center;
    }
    
    footer .footer-bottom-gradient [class*="flex-col"] > div {
        justify-content: center !important;
        align-items: center !important;
        text-align: center;
        width: 100%;
    }
    
    footer .footer-bottom-gradient .language-switcher {
        justify-content: center !important;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    footer .footer-bottom-gradient .language-switcher select {
        margin-right: 0 !important;
    }
}

/* Desktop - ensure language switcher stays on right */
@media (min-width: 640px) {
    footer .footer-bottom-gradient .language-switcher {
        margin-left: auto;
        justify-content: flex-end;
    }
}