/* YOVANSTRANS — Part 3: Gallery, Forms, Footer, Bottom Bar, Popup, Page Header, Posts, Misc */

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem
}

@media(min-width:768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr)
    }
}

@media(min-width:1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr)
    }
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base)
}

.gallery-item:hover img {
    transform: scale(1.05)
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base)
}

.gallery-item:hover .gallery-item-overlay {
    background: rgba(0, 0, 0, .3)
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center
}

.lightbox.active {
    display: flex
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    z-index: 2001
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius-lg)
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .1);
    border: none;
    color: var(--white);
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: var(--radius-md)
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, .2)
}

.lightbox-prev {
    left: 1rem
}

.lightbox-next {
    right: 1rem
}

/* Forms */
.form-group {
    margin-bottom: 1rem
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .4rem;
    color: var(--gray-700)
}

.form-control {
    width: 100%;
    padding: .75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color var(--transition-fast);
    min-height: 48px;
    background: var(--white)
}

.form-control:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1)
}

.form-control::placeholder {
    color: var(--gray-400)
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem
}

textarea.form-control {
    min-height: 100px;
    resize: vertical
}

/* Agent Selector */
.agent-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    margin-bottom: 1rem
}

@media(max-width:480px) {
    .agent-selector {
        grid-template-columns: 1fr
    }
}

.agent-option {
    text-align: center;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast)
}

.agent-option:hover,
.agent-option.selected {
    border-color: var(--blue-500);
    background: var(--blue-50)
}

.agent-option-name {
    font-weight: 700;
    font-size: .95rem
}

.agent-option-phone {
    font-size: .8rem;
    color: var(--gray-400);
    margin-top: .25rem
}

/* Footer */
.footer {
    background: var(--blue-900);
    color: var(--gray-300);
    padding: 3rem 0 0
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem
}

@media(min-width:768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(min-width:1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr
    }
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem
}

.footer-brand span {
    color: var(--yellow-400)
}

.footer-desc {
    font-size: .9rem;
    line-height: 1.7;
    margin-bottom: 1rem
}

.footer-social {
    display: flex;
    gap: .5rem
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .1);
    color: var(--white);
    transition: all var(--transition-fast)
}

.footer-social a:hover {
    background: var(--yellow-500);
    color: var(--gray-900)
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem
}

.footer-links a {
    display: block;
    color: var(--gray-400);
    font-size: .9rem;
    padding: .3rem 0;
    transition: color var(--transition-fast)
}

.footer-links a:hover {
    color: var(--yellow-400);
    padding-left: .3rem
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin-bottom: .5rem;
    font-size: .9rem
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 1rem 0;
    text-align: center;
    font-size: .8rem;
    color: var(--gray-500)
}

/* Bottom Bar */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--blue-900);
    border-top: 1px solid rgba(255, 255, 255, .1);
    z-index: 999;
    display: flex;
    padding: .5rem;
    gap: .25rem
}

.bottom-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    padding: .6rem 0;
    min-height: 52px;
    color: var(--gray-400);
    font-size: .7rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast)
}

.bottom-bar-item i {
    font-size: 1.3rem
}

.bottom-bar-item:hover,
.bottom-bar-item.active {
    color: var(--yellow-400);
    background: rgba(251, 191, 36, .1)
}

.bottom-bar-item.bottom-bar-wa {
    background: #25D366;
    color: var(--white);
    border-radius: var(--radius-lg)
}

.bottom-bar-item.bottom-bar-wa:hover {
    background: #1EBE5A
}

@media(min-width:1024px) {
    .bottom-bar {
        display: none
    }
}

/* Popup */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem
}

.popup-overlay.active {
    display: flex
}

.popup-modal {
    background: var(--white);
    border-radius: var(--radius-2xl);
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    position: relative;
    animation: popupIn .4s ease
}

.popup-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, .5);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1
}

.popup-image {
    width: 100%;
    height: auto;
    display: block
}

.popup-body {
    padding: 1.5rem;
    text-align: center
}

.popup-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: .5rem
}

.popup-text {
    color: var(--gray-500);
    font-size: .9rem;
    margin-bottom: 1rem
}

/* Page Header */
.page-header {
    background: var(--gradient-hero);
    padding: 100px 0 3rem;
    text-align: center;
    color: var(--white)
}

.page-header-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: .5rem
}

.page-header-subtitle {
    color: var(--gray-300);
    font-size: 1rem
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--gray-400);
    justify-content: center;
    margin-top: 1rem
}

.breadcrumb a {
    color: var(--yellow-400)
}

/* Post Card */
.post-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base)
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl)
}

.post-card-image {
    height: 200px;
    object-fit: cover;
    width: 100%
}

.post-card-body {
    padding: 1.5rem
}

.post-card-category {
    display: inline-block;
    padding: .2rem .6rem;
    background: var(--yellow-100);
    color: var(--yellow-700);
    font-size: .7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    margin-bottom: .5rem
}

.post-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .5rem
}

.post-card-title a {
    color: var(--gray-900)
}

.post-card-title a:hover {
    color: var(--blue-500)
}

.post-card-excerpt {
    color: var(--gray-500);
    font-size: .85rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.post-card-date {
    font-size: .8rem;
    color: var(--gray-400);
    margin-top: .5rem
}

/* Branch Card */
.branch-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-base)
}

.branch-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl)
}

.branch-card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--blue-50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--blue-500)
}

.branch-card-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .25rem
}

.branch-card-address {
    color: var(--gray-500);
    font-size: .85rem;
    margin-bottom: .5rem
}

.branch-card-hours {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .8rem;
    color: var(--gray-400);
    margin-bottom: 1rem
}

.branch-card-actions {
    display: flex;
    gap: .5rem;
    justify-content: center
}

/* Counter */
.counter-section {
    background: var(--gradient-brand);
    padding: 3rem 0
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    text-align: center
}

@media(min-width:768px) {
    .counter-grid {
        grid-template-columns: repeat(4, 1fr)
    }
}

.counter-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--blue-900)
}

.counter-label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--blue-800);
    margin-top: .25rem
}

/* Schedule Table */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem
}

.schedule-table th {
    background: var(--blue-700);
    color: var(--white);
    padding: .75rem 1rem;
    text-align: left;
    font-weight: 600
}

.schedule-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--gray-100)
}

.schedule-table tr:hover td {
    background: var(--blue-50)
}

@media(max-width:768px) {

    .schedule-table,
    .schedule-table thead,
    .schedule-table tbody,
    .schedule-table th,
    .schedule-table td,
    .schedule-table tr {
        display: block
    }

    .schedule-table thead {
        display: none
    }

    .schedule-table tr {
        margin-bottom: .5rem;
        background: var(--white);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
        padding: .5rem
    }

    .schedule-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: .5rem 1rem;
        border-bottom: 1px solid var(--gray-100)
    }

    .schedule-table td:last-child {
        border-bottom: none
    }

    .schedule-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-700);
        margin-right: 1rem
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: scale(.9) translateY(20px)
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0)
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all .6s ease
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0)
}

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    font-size: .9rem
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A
}

/* Badge */
.badge-promo {
    display: inline-block;
    padding: .25rem .75rem;
    background: var(--danger);
    color: var(--white);
    font-size: .75rem;
    font-weight: 700;
    border-radius: var(--radius-full)
}

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 80px;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--blue-500);
    color: var(--white);
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    z-index: 500
}

.scroll-top.visible {
    display: flex
}

.scroll-top:hover {
    background: var(--blue-700);
    transform: translateY(-2px)
}

@media(min-width:1024px) {
    .scroll-top {
        bottom: 2rem
    }
}