/*
 * Custom CSS for Tay Astra Child Theme
 * Optimized header, footer, and responsive layout
 */

/* Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Custom Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #2c2c2c #1a1a1a;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #2c2c2c;
    border-radius: 4px;
    border: 1px solid #3a3a3a;
}

::-webkit-scrollbar-thumb:hover {
    background: #f17a06;
}

/* Appointment Bar Styles */
.appointment-bar {
    background-color: hsl(0, 8%, 14%);
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.appointment-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.appointment-item {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 10px;
    position: relative;
    min-width: 220px;
}

.appointment-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    width: 1px;
    background-color: #e0e0e0;
}

.appointment-icon {
    margin-right: 12px;
    color: #f17a06;
    font-size: 24px;
    min-width: 30px;
    text-align: center;
}

.appointment-text {
    line-height: 1.4;
}

.appointment-text strong {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
}

.appointment-text span, 
.appointment-text a {
    font-size: 13px;
    color: #666;
}

.call-center .appointment-text a {
    color: #f17a06;
    font-weight: 600;
    text-decoration: none;
}
/* 404 page styles */
.site-404 div {
    text-align: center;
    padding: 100px 20px;
}   
.error-404 h1 {
    font-size: 48px;
    color: #f13d06;
    margin-bottom: 20px;
}
.error-404 p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}
.error-404 a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f17a06;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.error-404 a:hover {
    background-color: #bd5e00;
}
/* Navigation Bar Styles */
.nav-bar {
    background-color: #272020;
    padding: 0 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background-color: #f17a06;
    color: #fff;
}

/* Submenu Styles */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

.sub-menu li a:hover {
    background-color: #f17a06;
    color: #fff;
}

/* ===================== */
/* Mobile Menu Toggle - FIXED */
/* ===================== */
.mobile-toggle {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 25px;
    position: relative;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out;
}

.mobile-toggle span:nth-child(1) {
    top: 0;
}

.mobile-toggle span:nth-child(2) {
    top: 11px;
}

.mobile-toggle span:nth-child(3) {
    top: 22px;
}

/* Active state (hamburger to X) */
.mobile-toggle.active span:nth-child(1) {
    top: 11px;
    transform: rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    top: 11px;
    transform: rotate(-45deg);
}

/* ===================== */
/* optimized header and footer styles */
/* ===================== */
.footer-divider-small {
    width: 50%;
    position: relative;
    height: 1px;
    background-color: #32446d;
    margin: 20px 0;
}
.footer-divider {
    width: 100%;
    height: 2px;
    background-color: rgba(206, 206, 206, 0.541);
    margin: 20px 0;
}
.footer-column.contact-info img,
.payment-info img {
    width: 250px;
    height: 27px;
    aspect-ratio: 250/27;
    object-fit: contain;
}
.quick-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    left: 0;
    text-align: center;
}
.quick-links h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #fff;
    position: relative;
    left: 0;
    text-align: center;
}
/* For all images */
img {
    aspect-ratio: attr(width) / attr(height);
    max-width: 100%;
    height: auto;
}

/* ===================== */
/* HEADER: SITE BRANDING */
/* ===================== */
.site-branding {
    background-color: #272020;
    padding: 10px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-sizing: border-box;
    width: 100%;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-title {
    word-break: break-word;
    font-size: 1em;
    color: #ffffff;
    margin: 0;
    padding: 10px;
    flex: 1 1 auto;
    min-width: 200px;
}

.site-title:hover {
    color: #ffffff;
}

.lang-switcher-container {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.payment-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 0 0 auto;
}

.payment-info img {
    width: 200px;
    max-width: 100%;
    height: auto;
}

/* ===================== */
/* LANG SWITCHER STYLES */
/* ===================== */
.lang-switcher {
    position: relative;
    display: inline-block;
}
#current-lang-btn {
  background: none;
  border: 1px solid #ccc;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background-color: #333;
}

.lang-dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 5px);
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    list-style: none;
    padding: 5px 0;
    margin: 0;
    z-index: 1001;
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(-50%);
    left: 50%;
}

.lang-dropdown li {
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  color: #333;
}
.lang-dropdown.visible {
  display: block;
}

.lang-dropdown li:hover {
  background-color: #f0f0f0;
}

/* ===================== */
/* FOOTER: BASE LAYOUT   */
/* ===================== */
#custom-footer {
    background-color: #111;
    color: #fff;
    padding: 20px;
    font-size: 14px;
}

.footer-container {
    background-color: #111;
    padding: 20px;
    border-top: 1px solid #333;
}

/* ===================== */
/* FOOTER: TOP SECTION - IMPROVED */
/* ===================== */
.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.footer-column {
    flex: 1 1 auto;
    min-width: 250px;
}
.footer-column.contact-info h4{
    color: #fff;
}
.tweets-feed {
    color: #da8524;
}
/* Large screens: 3 columns */
@media (min-width: 1540px) {
    .footer-top {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Medium screens: 769-1539px - Quick links + Contacts side by side */
@media (min-width: 769px) and (max-width: 1539px) {
    .footer-top {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .tweets-feed {
        display: none;
    }
    
    .quick-links {
        grid-column: 1;
        display: flex;
        flex-direction: column;
    }
    
    .contact-info {
        grid-column: 2;
        display: flex;
        flex-direction: column;
    }
    
    /* Align both boxes at the top */
    .quick-links, 
    .contact-info {
        align-self: start;
    }
    
    /* Make boxes the same height */
    .footer-column {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    /* Visual improvements */
    .quick-links h4,
    .contact-info h4 {
        margin-top: 0;
        padding-top: 0;
    }
    
    .footer-divider-small {
        margin: 12px 0;
        width: 90%;
    }
    .mobile-toggle {
        display: none; /* Hide mobile toggle on desktop */
    }
    
    .nav-menu {
        display: flex !important; /* Force show on desktop */
    }
}

/* Mobile layout */
@media (max-width: 768px) {    
    .nav-container{
        height: 70px;
    }
    .footer-top {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .footer-column {
        flex: 1 1 auto;
        text-align: center;
        width: 100%;
        max-width: 350px;
    }
    
    .footer-divider-small {
        display: none;
    }
}

/* Improved Quick Links */
.quick-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.quick-links li {
    margin: 8px 0;
}

.quick-links a {
    display: block;
    padding: 6px 0;
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.quick-links a:hover {
    color: #fff;
}

/* Improved Contact Info */
.contact-info p {
    margin: 8px 0;
    line-height: 1.5;
}

.contact-info img {
    margin: 15px 0 10px;
}

/* Unified Divider Styles */
.footer-divider-small {
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, #32446d, transparent);
    margin: 15px auto;
    display: block;
    border: none;
}

/* ===================== */
/* FOOTER: SOCIAL ICONS  */
/* ===================== */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.footer-social i {
    font-size: 16px;
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-social i:hover {
    color: #fff;
}
.footer-description {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #ccc;
}

/* ===================== */
/* RESPONSIVE LAYOUT ENHANCEMENTS */
/* ===================== */
@media (max-width: 1200px) {
    .appointment-item {
        min-width: 180px;
    }
    
    .nav-menu > li > a {
        padding: 15px 15px;
        font-size: 14px;
    }
}

/* Medium devices (tablets, 992px and down) */
@media (max-width: 992px) {
    .appointment-container {
        padding: 0 15px;
    }
    
    .appointment-item {
        flex: 1 1 48%;
        margin: 0 1% 15px;
        padding: 0 10px;
    }
    
    .appointment-item:not(:last-child)::after {
        height: 30px;
    }
    
    /* Remove separators for last in row */
    .appointment-item:nth-child(2n)::after {
        display: none;
    }
    
    .appointment-text strong {
        font-size: 13px;
    }
    
    .appointment-text span, 
    .appointment-text a {
        font-size: 12px;
    }
    
    .nav-menu > li > a {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* Tablets and small desktops (769px-992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .appointment-item {
        flex: 1 1 48%;
    }
    
    .nav-menu > li > a {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .site-title {
        font-size: 0.9em;
    }
}

/* Mobile devices (768px and down) */
@media (max-width: 768px) {
    .appointment-item {
        flex: 1 1 100%;
        margin-bottom: 15px;
    }
    
    .appointment-item::after {
        display: none !important;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #272020;
        flex-direction: column;
        z-index: 9999;
        overflow-y: auto;
        padding: 80px 20px 20px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    }
    .nav-menu.active {
        transform: translateX(0);
        display: flex;
    }
    
    .nav-menu > li > a {
        padding: 12px 20px;
        border-bottom: 1px solid #3a3a3a;
    }
    
    .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .menu-item-has-children:hover .sub-menu,
    .menu-item-has-children.active .sub-menu {
        display: block;
    }
    
    .sub-menu li a {
        padding-left: 30px;
        background: #1e1e1e;
        color: #ccc;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    /* HEADER FIXES */
    .site-branding {
        padding: 15px;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .header-left,
    .header-right {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .site-title {
        text-align: center;
        margin-bottom: 0;
        padding: 10px 0;
        order: 1;
    }
    
    .lang-switcher-container {
        width: 100%;
        display: flex;
        justify-content: center;
        order: 2;
        margin: 10px 0;
    }
    
    .lang-switcher {
        text-align: center;
        margin: 0 auto;
    }
    
    .lang-dropdown {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .payment-info {
        justify-content: center;
        margin-top: 0;
        order: 3;
    }
    
    /* FOOTER FIXES */
    .footer-top {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .footer-column {
        flex: 1 1 auto;
        text-align: center;
        width: 100%;
        max-width: 350px;
    }

    .footer-social {
        flex-direction: row;
        gap: 10px;
    }

    #custom-footer {
        text-align: center;
    }
}

/* Small mobile devices (480px and down) */
@media (max-width: 480px) {
    .site-branding {
        padding: 10px;
    }
    
    .payment-info img {
        width: 180px;
    }
    
    .site-title {
        font-size: 0.9em;
    }
    
    .lang-switcher-container {
        width: 100%;
        display: flex;
        justify-content: center;
        margin: 10px 0;
    }
    
    .lang-dropdown {
        top: 100%;
        transform: translateX(-50%);
        left: 50%;
    }
    
    .lang-switcher {
        text-align: center;
    }
    
    .footer-divider-small {
        width: 70%;
        margin: 20px auto;
    }
}

/* ===================== */
/* ENHANCED MOBILE MENU */
/* ===================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .mobile-toggle {
        position: relative;
        z-index: 10001;
        transition: transform 0.3s ease;
    }
    
    .mobile-toggle.active {
        position: fixed;
        top: 25px;
        right: 20px;
        transform: rotate(180deg);
    }
    
    /* Close icon */
    .mobile-toggle.active span:nth-child(1) {
        top: 11px;
        left: 5px;
        transform: rotate(45deg) scaleX(1.2);
    }
    
    .mobile-toggle.active span:nth-child(3) {
        top: 11px;
        left: 5px;
        transform: rotate(-45deg) scaleX(1.2);
    }
    
    /* Menu items animation */
    .nav-menu > li {
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    
    .nav-menu.active > li {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Animation delay for items */
    .nav-menu.active > li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active > li:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.active > li:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.active > li:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.active > li:nth-child(5) { transition-delay: 0.3s; }
    .nav-menu.active > li:nth-child(6) { transition-delay: 0.35s; }
}