/* ============================================
   APPOINTMENT PAGE STYLES
   Thanaplus Life Center
   ============================================ */

/* --- SHARED STYLES --- */
:root {
    /* Main site colors (blue theme from other pages) */
    --bg-white: #ffffff;
    --bg-warm-white: #fef9f3;
    --text-dark: #333333;
    --text-muted: #007399; /* Darker for better contrast */
    --brand-blue: #0099cc;
    --brand-blue-dark: #007399;
    --brand-green: #32c48d;
    --brand-green-dark: #28a375;

    /* Form-specific softer colors */
    --form-bg: #fafafa;
    --form-primary: #5a9aa8;
    --form-primary-dark: #4a8a98;
    --form-accent: #7db8a8;
    --form-accent-dark: #6aa898;
    --border-light: #cccccc;
}
body { font-family: 'Sarabun', sans-serif; background-color: var(--bg-white); color: var(--text-dark); }
h1, h2, h3, h4, .navbar-brand { font-family: 'Playfair Display', serif; color: var(--text-dark); }

/* --- NAVBAR (Blue theme) --- */
.navbar-area {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 153, 204, 0.1);
}
.nav-link {
    font-weight: 500;
    color: #555 !important;
    font-family: 'Sarabun', sans-serif;
    position: relative;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 8px 15px;
    border-radius: 4px;
}
.nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--brand-blue-dark);
    transition: width 0.3s ease, left 0.3s ease;
}
.nav-link:hover {
    color: var(--brand-blue) !important;
    background-color: rgba(0, 153, 204, 0.08);
}
.nav-link:not(.dropdown-toggle):hover::after {
    width: 70%;
    left: 15%;
}
.nav-link.active { color: var(--brand-blue) !important; }

/* --- DROPDOWN HOVER ANIMATION (Desktop) --- */
.navbar-nav .dropdown-toggle::after {
    display: none;
}

@media (min-width: 992px) {
    .navbar-nav .dropdown:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .navbar-nav .dropdown-menu {
        margin-top: 0;
        border: none;
        border-radius: 8px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
        display: block;
    }
}

@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        border: none;
        background: rgba(0, 0, 0, 0.03);
        border-radius: 8px;
        margin: 5px 0;
        padding: 10px 0;
    }
    .navbar-nav .dropdown-menu .dropdown-item {
        padding: 8px 25px;
    }
    .navbar-nav .dropdown-toggle::after {
        display: inline-block;
        margin-left: 5px;
        vertical-align: middle;
        content: "";
        border-top: 0.3em solid;
        border-right: 0.3em solid transparent;
        border-bottom: 0;
        border-left: 0.3em solid transparent;
    }
}

.dropdown-item {
    padding: 10px 20px;
    font-family: 'Sarabun', sans-serif;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.dropdown-item:hover {
    background-color: rgba(0, 153, 204, 0.08);
    color: var(--brand-blue);
}
.dropdown-item.active {
    background-color: var(--brand-blue);
    color: #fff;
}

/* --- PAGE HEADER (Blue theme - matching other pages) --- */
.page-header {
    background: linear-gradient(135deg, rgba(0, 153, 204, 0.85) 0%, rgba(50, 196, 141, 0.75) 100%), url('../calendar.webp');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    min-height: 220px;
    text-align: center;
    color: white;
}
.page-header h1 { color: white; margin-bottom: 10px; }
.page-header p { opacity: 0.95; }

/* --- PHONE CALL BANNER (Blue theme) --- */
.phone-banner {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 18px 25px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.phone-banner-icon {
    width: 45px;
    height: 45px;
    background: rgba(0, 153, 204, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.phone-banner-text {
    text-align: center;
}
.phone-banner-text p {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
}
.phone-banner-text a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--brand-blue);
    text-decoration: none;
}
.phone-banner-text a:hover {
    color: var(--brand-blue-dark);
    text-decoration: underline;
}

/* --- IFRAME CONTAINER --- */
.iframe-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border-top: 3px solid var(--form-primary);
    overflow: hidden;
    position: relative;
    min-height: 800px;
}
.iframe-container iframe {
    width: 100%;
    min-height: 800px;
    border: none;
    display: block;
}
.iframe-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    z-index: 1;
    color: var(--brand-blue);
    font-size: 1.1rem;
}
.iframe-loading i {
    font-size: 2rem;
    margin-bottom: 15px;
}
.iframe-loading p {
    margin: 0;
    font-weight: 500;
    color: var(--text-dark);
}

/* --- FOOTER --- */
.footer-area {
    background-color: #2d3e4a;
    color: #b0bec5;
    padding-top: 60px;
}
.footer-area h5 {
    color: #ffffff;
    font-family: 'Sarabun', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}
.footer-area h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background: var(--brand-blue);
}
.footer-area p {
    color: #9aabb7; /* Updated for better contrast */
    font-size: 0.9rem;
    line-height: 1.7;
}
.footer-area a {
    color: #b0bec5;
    transition: color 0.3s ease, padding-left 0.3s ease;
    text-decoration: none;
    display: inline-block;
}
.footer-area a:hover {
    color: var(--brand-green);
    text-decoration: none;
    padding-left: 5px;
}
.footer-logo {
    max-height: 50px;
    margin-bottom: 15px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 10px;
}
.footer-links a {
    font-size: 0.9rem;
}
.footer-links a::before {
    content: '>';
    margin-right: 8px;
    color: var(--brand-blue);
    transition: margin-right 0.3s ease;
}
.footer-links a:hover::before {
    margin-right: 12px;
}
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}
.footer-contact-item i {
    color: var(--brand-green);
    margin-right: 12px;
    margin-top: 4px;
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}
.footer-contact-item span {
    font-size: 0.9rem;
    color: #b0bec5;
    line-height: 1.5;
}
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.3s ease;
    padding-left: 0;
}
.footer-social a:hover {
    transform: translateY(-2px);
    padding-left: 0;
}
.footer-social a.line-icon:hover { background: #06C755; }
.footer-social a.facebook-icon:hover { background: #1877F2; }
.footer-social a.instagram-icon:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.footer-social a.youtube-icon:hover { background: #FF0000; }
.footer-hours {
    margin-top: 20px;
}
.footer-hours p {
    margin-bottom: 5px;
    font-size: 0.85rem;
}
.footer-bottom {
    background: rgba(0,0,0,0.15);
    padding: 18px 0;
    margin-top: 40px;
}
.footer-bottom p {
    margin: 0;
    font-size: 0.8rem;
    color: #7d8d99; /* Updated for better contrast */
}
.footer-bottom a {
    color: #9aabb7; /* Updated for better contrast */
    padding-left: 0;
}
.footer-bottom a:hover {
    color: var(--brand-green);
    padding-left: 0;
}
.footer-col-2 {
    padding-left: 60px;
}
@media (max-width: 991.98px) {
    .footer-col-2 {
        padding-left: 15px;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--brand-blue);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
    z-index: 9999;
    box-shadow: 0 3px 12px rgba(0, 153, 204, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--brand-blue-dark);
    transform: translateY(-2px);
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--brand-blue);
    color: white;
    padding: 10px 20px;
    z-index: 10000;
    transition: top 0.3s;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}
.skip-link:focus {
    top: 0;
    color: white;
    text-decoration: none;
}

@media (max-width: 576px) {
    .phone-banner {
        flex-direction: column;
        text-align: center;
    }
    .iframe-container {
        min-height: 600px;
        border-radius: 12px;
    }
    .iframe-container iframe {
        min-height: 600px;
    }
}
