/* ==========================================================================
   Footer Styles
   ========================================================================== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0 20px;
    font-family: var(--font-family-footer);
}

.footer-widgets {
    display: grid;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.site-footer {
    padding-bottom: 0;
}

/* Dynamic Footer Columns */
body.footer-columns-1 .footer-widgets {
    grid-template-columns: 1fr;
}

body.footer-columns-2 .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
}

body.footer-columns-3 .footer-widgets {
    grid-template-columns: repeat(3, 1fr);
}

body.footer-columns-4 .footer-widgets {
    grid-template-columns: repeat(4, 1fr);
}

.footer-column {
    min-width: 0;
}

.site-info {
    background-color: var(--site-info-bg); 
    text-align: center;
    padding-top: 80px;
    padding-bottom: 80px;
    border-top: 1px solid var(--site-info-border);
    font-size: 0.9rem;
    color: var(--site-info-text);
    margin-bottom: 0;
    font-family: var(--font-family-footer);
}

@media (max-width: 768px) {
    .footer-widgets {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Footer Widget Styles
   ========================================================================== */

/* General Footer Widget Styles */
.footer-widgets .widget {
    margin-bottom: 30px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.footer-widgets .widget-title {
    color: var(--footer-widget-title);
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--footer-widget-title-border);
    position: relative;
    font-family: var(--font-family-footer-widget-title);
}

.footer-widgets .widget-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

/* Lists (Categories, Archives, Pages, etc.) */
.footer-widgets .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--font-family-footer-lists);
}

.footer-widgets .widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--site-info-border);
}

.footer-widgets .widget li:last-child {
    border-bottom: none;
}

.footer-widgets .widget li a {
    color: var(--footer-widget-text);
    display: block;
    transition: all 0.3s ease;
    padding-left: 0;
    position: relative;
    font-family: var(--font-family-footer-lists);
}

.footer-widgets .widget li a:hover {
    color: var(--footer-widget-link-hover); /* Change to white (#fff) */
    padding-left: 10px;
    text-decoration: none;
}

.footer-widgets .widget li a:before {
    content: "→";
    position: absolute;
    left: -15px;
    color: var(--primary-color);
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-widgets .widget li a:hover:before {
    opacity: 1;
    left: -10px;
}

/* Text Widget */
.footer-widgets .widget_text {
    color: var(--footer-widget-text);
    line-height: 1.7;
    font-family: var(--font-family-footer-widget-text);
}

.footer-widgets .widget_text p {
    margin-bottom: 15px;
}

.footer-widgets .widget_text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-widgets .widget_text a:hover {
    color: var(--footer-widget-link-hover); /* Change to white (#fff) */
}

/* Recent Posts Widget */
.footer-widgets .widget_recent_entries .post-date {
    display: block;
    font-size: 0.8em;
    color: var(--footer-search-placeholder);
    margin-top: 3px;
    font-family: var(--font-family-footer-widget-text);
}

/* Tag Cloud */
.footer-widgets .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-widgets .tagcloud a {
    display: inline-block;
    padding: 5px 12px;
    background: var(--footer-tag-cloud-bg);
    color: var(--footer-tag-cloud-text);
    border-radius: 3px;
    font-size: 0.85rem !important;
    transition: all 0.3s ease;
    font-family: var(--font-family-footer-tag-cloud);
}

.footer-widgets .tagcloud a:hover {
    background: var(--primary-color);
    color: var(--background-color);
    text-decoration: none;
}

/* Search Widget */
.footer-widgets .widget_search input[type="search"] {
    width: 100%;
    padding: 12px 15px;
    background: var(--footer-search-bg);
    border: 1px solid var(--footer-search-border);
    border-radius: 5px;
    color: var(--background-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: var(--font-family-search-form);
}

.footer-widgets .widget_search input[type="search"]::placeholder {
    color: var(--footer-search-placeholder);
}

.footer-widgets .widget_search input[type="search"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px var(--input-focus-shadow);
    background: rgba(255, 255, 255, 0.15);
}

.footer-widgets .widget_search input[type="submit"] {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    padding: 0 15px;
    background: var(--primary-color);
    color: var(--background-color);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family-buttons);
}

.footer-widgets .widget_search input[type="submit"]:hover {
    background: var(--button-hover);
}

/* Calendar Widget */
.footer-widgets .widget_calendar table {
    width: 100%;
    border-collapse: collapse;
    color: var(--footer-calendar-text);
    font-family: var(--font-family-footer-calendar);
}

.footer-widgets .widget_calendar caption {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--background-color);
    font-family: var(--font-family-footer-calendar);
}

.footer-widgets .widget_calendar th {
    background: var(--footer-search-bg);
    color: var(--background-color);
    font-family: var(--font-family-footer-calendar);
}

.footer-widgets .widget_calendar td {
    border: 1px solid var(--footer-calendar-border);
}

.footer-widgets .widget_calendar #today {
    background: var(--primary-color);
    color: var(--background-color);
    font-weight: bold;
}

/* Contact Info Widget */
.footer-widgets .widget_contact_info .contact-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: var(--font-family-footer-widget-text);
}

.footer-widgets .widget_contact_info .contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .footer-widgets .widget {
        margin-bottom: 25px;
    }
    
    .footer-widgets .widget-title {
        font-size: 1.1rem;
    }
}

/* Enhanced Footer Widgets for Customizer Preview */
.footer-widgets {
    display: grid;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

/* Column Layout Classes */
.footer-columns-1 {
    grid-template-columns: 1fr;
}
.footer-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}
.footer-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}
.footer-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Widget Area Styling */
.footer-widget-area {
    min-width: 0;
    padding: 0 10px;
}

/* Widget Styling to Match Front-end */
.footer-widget-area .widget {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--widget-transparent-bg);
    border-radius: 5px;
}

/* Responsive Behavior */
@media (max-width: 768px) {
    .footer-widgets {
        grid-template-columns: 1fr !important;
        padding: 0 15px;
    }
    .footer-widget-area {
        padding: 0;
        margin-bottom: 30px;
    }
    .footer-widget-area:last-child {
        margin-bottom: 0;
    }
}

/* Fix for footer scrollbar */
.site-footer {
    overflow: hidden;
}

