/* ============================================================
   Veera Dance Academy — CSS Fix Patch (append to style.css)
   Fixes: contact button on <button> elements, counter display,
          class card timing alignment, general PHP 8.4 compatibility
   ============================================================ */

/* ---- Fix: btn-primary-custom on <button> elements ---- */
button.btn-primary-custom,
input[type="submit"].btn-primary-custom,
input[type="button"].btn-primary-custom {
    -webkit-appearance: none;
    appearance: none;
    border: none !important;
    outline: none;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    background: var(--gradient) !important;
    background-image: linear-gradient(135deg, #E63946, #c2185b) !important;
    color: #fff !important;
    padding: 14px 32px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.3px;
    transition: all 0.3s;
}

button.btn-primary-custom:hover,
button.btn-primary-custom:focus {
    opacity: 0.88;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 57, 70, 0.35);
    color: #fff !important;
}

button.btn-outline-custom,
a.btn-outline-custom {
    display: inline-flex;
    align-items: center;
    padding: 13px 30px;
    border: 2px solid var(--primary);
    border-radius: 50px;
    color: var(--primary) !important;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
}

button.btn-outline-custom:hover,
a.btn-outline-custom:hover {
    background: var(--primary);
    color: #fff !important;
}

/* ---- Fix: Contact page form styling ---- */
.contact-form-section .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}
.contact-form-section .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

/* ---- Fix: Counter NaN — ensure count-up keeps its size ---- */
.count-up {
    display: inline-block;
    min-width: 2ch;
}

.counter-card {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.counter-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-4px);
}

.counter-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.4rem;
    color: #fff;
}

.counter-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
    font-family: 'Playfair Display', serif;
}

.counter-suffix {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.counter-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 8px;
    margin-bottom: 0;
    font-weight: 600;
}

/* ---- Fix: Class card timing text alignment ---- */
.class-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
}

.class-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.83rem;
    color: #666;
    line-height: 1.4;
}

.class-meta-item i {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
    width: 14px;
    text-align: center;
}

/* ---- Fix: Class card timings — don't truncate, wrap nicely ---- */
.class-timings-text {
    word-break: break-word;
    white-space: normal;
    line-height: 1.4;
}

/* ---- Fix: Pricing card featured styling ---- */
.pricing-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px;
    border: 2px solid #e8e8e8;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    height: 100%;
}
.pricing-card:hover { transform: translateY(-5px); box-shadow: 0 20px 50px rgba(0,0,0,0.1); }
.pricing-card.featured {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 20px 50px rgba(230,57,70,0.3);
}
.pricing-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: #fff;
    padding: 4px 18px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}
.pricing-card.featured .pricing-tag { background: rgba(255,255,255,0.25); }
.plan-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.plan-price span { font-size: 0.9rem; font-weight: 400; color: #888; }
.pricing-card.featured .plan-price { color: #fff; }
.pricing-card.featured .plan-price span { color: rgba(255,255,255,0.7); }
.plan-admission { font-size: 0.82rem; color: #888; margin-top: 6px; }
.pricing-card.featured .plan-admission { color: rgba(255,255,255,0.7); }
.pricing-features { flex: 1; margin: 20px 0; }
.feature-item { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.pricing-card.featured .feature-item { border-bottom-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.9); }
.pricing-card.featured .feature-item .fas { color: rgba(255,255,255,0.9) !important; }

/* ---- Fix: Page loader CSS fallback ---- */
@keyframes loaderAutoHide {
    0%, 75% { opacity: 1; visibility: visible; }
    100%     { opacity: 0; visibility: hidden;  }
}
#pageLoader {
    animation: loaderAutoHide 6s ease forwards;
}
#pageLoader.fade-out {
    animation: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* ---- Fix: Gallery item (fix 'Array' broken image) ---- */
.gallery-item img[src$="Array"],
.gallery-item img[src*="/Array"] {
    display: none;
}

/* ---- Fix: Admin table responsive overflow ---- */
.table-responsive { border-radius: 0 0 12px 12px; }

/* ---- Fix: Alert in admin ---- */
.admin-content .alert { border-radius: 10px; font-size: 0.9rem; border: none; }

/* ============================================================
   FOOTER COLOR FIX
   Newsletter: dark navy (not red) to prevent red-red clash
   ============================================================ */

/* Override any existing .newsletter-section red background */
.newsletter-section {
    background: #1D3557 !important;  /* dark navy */
    padding: 60px 0 !important;
}

.newsletter-section h3,
.newsletter-section h4,
.newsletter-section p {
    color: #fff;
}

.newsletter-section .opacity-80,
.newsletter-section small {
    color: rgba(255,255,255,.65) !important;
}

/* Footer consistent dark theme */
.main-footer {
    background: #111927;
}

.footer-top {
    background: #111927;
    padding: 60px 0 40px;
}

.footer-bottom {
    background: #0a1020;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.5);
    font-size: .85rem;
}

.footer-title {
    color: #fff !important;
    font-weight: 700 !important;
    margin-bottom: 18px !important;
    font-size: 1rem !important;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--primary, #E63946);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255,255,255,.55);
    text-decoration: none;
    font-size: .88rem;
    transition: color .2s;
}

.footer-links a:hover {
    color: var(--primary, #E63946);
    padding-left: 4px;
}

.footer-contact-info p {
    color: rgba(255,255,255,.6);
    font-size: .88rem;
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.footer-contact-info a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
}

.footer-contact-info a:hover { color: var(--primary); }

.footer-contact-info i {
    color: var(--primary, #E63946);
    margin-top: 2px;
    flex-shrink: 0;
}

.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    transition: all .3s;
    font-size: .9rem;
}

.footer-social a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.footer-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.footer-brand span { color: var(--primary, #E63946); }

.footer-post-title {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.4;
    display: block;
    transition: color .2s;
}

.footer-post-title:hover { color: var(--primary); }

.footer-post-date {
    color: rgba(255,255,255,.4);
    font-size: .78rem;
    margin-top: 3px;
}

/* ============================================================
   LOGO SIZE FIX — constrains uploaded logo in navbar
   ============================================================ */

/* Limit logo height — works for any image uploaded */
.main-navbar .nav-logo,
.navbar-brand img.nav-logo {
    height: 60px !important;
    max-height: 60px !important;
    max-width: 220px !important;
    width: auto !important;
    object-fit: contain !important;
}

/* Keep navbar at fixed height regardless of logo size */
.main-navbar.navbar {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    min-height: 72px;
}

/* Navbar brand padding */
.main-navbar .navbar-brand {
    padding-top: 4px;
    padding-bottom: 4px;
}

/* Top bar stays thin */
.top-bar {
    padding: 8px 0 !important;
    font-size: .82rem;
}

/* ============================================================
   PAGE LOADER — show logo image if available
   ============================================================ */

/* Loader logo image */
#pageLoader .loader-logo {
    max-height: 80px;
    max-width: 220px;
    width: auto;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
    animation: loaderLogoFade 0.5s ease;
}

@keyframes loaderLogoFade {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

/* Keep loader text when no logo */
#pageLoader h2 { margin-bottom: 20px; }

/* ============================================================
   FOOTER LOGO SIZE FIX
   ============================================================ */

/* Footer logo — never stretches the column */
.footer-widget .footer-logo img,
.main-footer .footer-logo img,
footer img.footer-logo-img {
    max-height: 80px !important;
    max-width: 200px !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
}

/* Footer logo wrapper — ensure it doesn't stretch */
.footer-logo {
    display: flex;
    align-items: flex-start;
}