/*
Theme Name: Shalina QR Theme
Theme URI: https://www.shalina.com/
Author: Shalina Healthcare
Author URI: https://www.shalina.com/
Description: Global QR Landing Page for Shalina Corporate
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
Text Domain: shalina-qr
License: Proprietary
*/

:root {
    --primary-blue: #1A365D;
    --accent-blue: #23356A;
    --light-blue: #F3F5FA; /* Section background */
    --white: #FFFFFF;
    
    --card-radius: 12px;
    --text-main: #333333;
    --text-muted: #666666;
    
    /* Medspace Card Colors */
    --medspace-bg: #FFF3EB;
    --medspace-border: #FFD8C4;
    --medspace-text: #E84E1B;
    
    /* Calculator Card Colors */
    --calc-bg: #EFFFF9;
    --calc-border: #BBF7D0;
    --calc-text: #15B77A;
    
    /* Newsletter Colors */
    --news-bg: #FFF3DE;
    --news-border: #FDE68A;
    --news-text: #D18303;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
    background: var(--white);
    display: flex;
    flex-direction: column;
}
.header-top {
    height: 56px;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1A365D;
}

.header-logo-wrapper {
    display: flex;
    justify-content: flex-start;
}

.header-divider {
    border-top: 1px solid #EAEAEA;
    width: 100%;
}

.country-language-selector {
    width: 100%;
    padding: 16px;
}

.site-logo {
    height: 32px;
    width: auto;
}


.selector-inner {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 8px 12px;
    height: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: var(--white);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.selector-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0;
    color: var(--text-muted);
}

.selector-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-blue);
    cursor: pointer;
}

.custom-language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #FFFFFF;
    border: 1px solid #B4C6E4; /* Soft blue border */
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    z-index: 100;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.custom-language-dropdown.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.language-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.language-item {
    border-bottom: 1px solid #E5E7EB;
}

.language-item:last-child {
    border-bottom: none;
}

.language-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    text-decoration: none;
    color: #4B5563; /* Dark gray for unselected */
}

.language-item a:hover {
    background: #F9FAFB;
}

.lang-left {
    display: flex;
    align-items: center;
}

.lang-left img, .flag-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
}

.flag-placeholder {
    background: #E5E7EB;
    display: inline-block;
}

.language-item .country-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 500;
}

.language-item .divider {
    margin: 0 6px;
    color: #9CA3AF;
    font-weight: 400;
}

.language-item .language-code {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #4B5563;
}

.language-item.is-active .country-name {
    color: #2B368B; /* Dark blue for active */
    font-weight: 600;
}

/* Rotate chevron when open */
.selector-trigger.is-open .chevron-down {
    transform: rotate(180deg);
}
.selector-trigger .chevron-down {
    transition: transform 0.2s ease;
}

.selector-current {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.1;
    color: #505050;
}

.country-name {
    color: #3E4594;
}

.flag-icon {
    display: inline-block;
    width: 16px;
    height: 12px;
    background: linear-gradient(to right, #008751 33.33%, #fff 33.33%, #fff 66.66%, #008751 66.66%);
    border-radius: 2px;
}

/* =========================================
   MAIN
   ========================================= */
.site-main {
    width: 100%;
}

/* --- Hero Section --- */
.section-hero {
    padding: 16px;
    background: var(--white);
}
.hero-banner-image {
    width: 100%;
    border-radius: 12px;
}

/* --- Healthcare Section Background --- */
.section-healthcare-wrapper {
    background-color: var(--light-blue);
    padding-bottom: 24px;
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    padding: 24px 16px 12px;
}
.section-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: -0.05em;
    color: #282828;
    margin: 0 0 2px;
}
.section-header p {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.05em;
    text-transform: capitalize;
    color: var(--text-muted);
    margin: 0 0 12px;
}
.heartbeat-divider {
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}
.heartbeat-divider svg {
    width: 48px;
    height: auto;
}

/* --- Cards Grid (Mobile First) --- */
.cards-grid {
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* --- Healthcare Cards --- */
.healthcare-card {
    background: var(--white);
    border-radius: var(--card-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    position: relative;
}
.card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--white);
    border-radius: var(--card-radius) var(--card-radius) 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
}
.card-tag {
    position: absolute;
    top: 4px;
    left: -8px;
    background: #007EBB;
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    height: 26px;
    padding: 0 12px 0 6px;
    border-radius: 0 4px 4px 0;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.2px;
}
.card-tag::before {
    content: "";
    border-bottom: 6px solid #005F91;
    border-left: 8px solid transparent;
    width: 0;
    height: 0;
    position: absolute;
    top: -6px;
    left: 0;
}
.card-tag .tag-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--white);
}
.card-content {
    padding: 12px;
}
.card-content h3 {
    margin: 0 0 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    color: #282828;
}
.card-link-text {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-blue);
}
.card-content .card-link-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #3E4191;
}

/* --- WhatsApp Section --- */
.section-whatsapp {
    padding: 20px 16px;
}
.btn-whatsapp {
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #4DCB5B 0%, #22A836 100%);
    color: white;
    text-decoration: none;
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(57, 195, 56, 0.25);
}
.btn-whatsapp .wa-icon {
    width: 24px;
    height: 24px;
}
.btn-whatsapp .btn-text {
    flex: 1;
    margin-left: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
.btn-whatsapp .btn-arrow {
    display: flex;
    align-items: center;
}

/* --- Learning Cards --- */
.section-learning {
    padding-top: 16px;
    padding-bottom: 32px;
    background: var(--white);
}

/* Base learning card styles */
.learning-card, .newsletter-card {
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.learning-card {
    min-height: 217px;
}
.learning-card .card-logo {
    height: 28px;
    margin-bottom: 12px;
}
.newsletter-card .card-logo {
    background: #FFFFFF;
    border: 1px solid #F5A625;
    border-radius: 4px;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    align-self: flex-start;
}
.newsletter-card .card-logo img {
    height: 18px;
}
.learning-card .card-logo img {
    height: 100%;
    object-fit: contain;
    object-position: left;
}
.learning-card h3, .newsletter-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    margin: 0 0 4px;
    color: #282828;
}
.learning-card p, .newsletter-card p {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0;
    color: #434343;
    margin: 0 0 12px;
}
.learning-card .card-link-text, .newsletter-card .card-link-text {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    margin-top: auto;
}

/* Specific Learning Card Colors */
.learning-card.medspace {
    background: var(--medspace-bg);
    border: 1px solid var(--medspace-border);
    border-bottom: 2px solid var(--medspace-text);
}
.learning-card.medspace h3 { color: var(--text-main); }
.learning-card.medspace p { color: var(--text-muted); }
.learning-card.medspace .card-link-text { color: var(--medspace-text); }

.learning-card.calculators {
    background: var(--calc-bg);
    border: 1px solid var(--calc-border);
    border-bottom: 2px solid var(--calc-text);
}
.learning-card.calculators h3 { color: var(--text-main); }
.learning-card.calculators p { color: var(--text-muted); }
.learning-card.calculators .card-link-text { color: var(--calc-text); }

/* --- Newsletter Card --- */
.newsletter-card {
    grid-column: 1 / -1;
    background: var(--news-bg);
    border: 1px solid var(--news-border);
    border-bottom: 2px solid #F5A625;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}
.newsletter-card .card-logo {
    height: 24px;
    margin-bottom: 8px;
}
.newsletter-card .card-logo img {
    height: 100%;
    object-fit: contain;
    object-position: left;
}
.newsletter-card h3 {
    color: var(--text-main);
    font-size: 14px;
}
.newsletter-card p {
    color: var(--text-muted);
}
.newsletter-card .card-link-text {
    color: var(--news-text);
}

/* --- Adverse Event Card --- */
.adverse-event-card {
    grid-column: 1 / -1;
    background: var(--light-blue);
    border: 1px solid #E2E8F4;
    border-bottom: 2px solid var(--primary-blue);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}
.adverse-event-card .card-logo {
    height: 20px;
    width: 20px;
    flex: 0 0 20px;
}
.adverse-event-card .card-content {
    flex: 1 1 auto;
    min-width: 0;
}
.adverse-event-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    margin: 0;
    color: var(--primary-blue);
}
.adverse-event-card p {
    display: none;
}
.adverse-event-card .card-arrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    color: var(--primary-blue);
}
.adverse-event-card:active {
    background: #E9ECF4;
}
.adverse-event-card:active .card-arrow {
    color: var(--accent-blue);
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    background: var(--primary-blue);
    color: var(--white);
    padding: 32px 24px 24px;
}
.footer-logo {
    margin-bottom: 24px;
}
.footer-logo img {
    width: 76px;
    height: auto;
}
.footer-description {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0;
    color: #A0B2CD;
    margin-bottom: 32px;
}
.footer-social h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 0;
    margin: 0 0 16px;
    color: var(--white);
}
.social-icons {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}
.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #4A6B9C;
    border-radius: 50%;
    color: var(--white);
    transition: background 0.2s;
}
.social-icons svg {
    width: 14px;
    height: 14px;
}
.footer-divider {
    border: 0;
    border-top: 1px solid #646464;
    margin: 32px 0;
    width: 100%;
}
.footer-copyright {
    font-size: 11px;
    color: #748BAA;
    border-top: 1px solid #2B4A77;
    padding-top: 24px;
}

/* =========================================
   RESPONSIVE (Tablet / Desktop Adaptations)
   ========================================= */
@media (min-width: 600px) {
    .learning-card.medspace, .learning-card.calculators {
        flex: 1;
    }
    .section-whatsapp {
        display: flex;
        justify-content: center;
    }
    .btn-whatsapp {
        width: 100%;
        max-width: 400px;
    }
}

@media (min-width: 900px) {
    .site-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 16px 40px;
        align-items: center;
    }
    .header-logo-wrapper {
        width: auto;
    }
    .country-language-selector {
        width: 300px;
    }
    .section-hero {
        padding: 24px 40px;
        max-width: 1200px;
        margin: 0 auto;
    }
    .section-healthcare-wrapper, .section-learning {
        padding-left: 24px;
        padding-right: 24px;
    }
    .section-healthcare, .section-learning, .section-whatsapp {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    .cards-grid {
        padding: 0;
    }
    .site-footer {
        padding: 48px 40px 24px;
        display: flex;
        flex-wrap: wrap;
        max-width: 1200px;
        margin: 0 auto;
    }
    .footer-description {
        flex: 1 1 100%;
        max-width: 400px;
    }
}

/* =========================================
   MOBILE INTERACTIONS & SCROLL REVEAL
   ========================================= */

/* Scroll Reveal Classes (Subtle) */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Touch / Active States */
.btn-whatsapp,
.learning-card,
.newsletter-card,
.cards-grid > a {
    transition: transform 0.15s ease, opacity 0.6s ease;
    will-change: transform;
}

.btn-whatsapp:active,
.learning-card:active,
.newsletter-card:active,
.cards-grid > a:active {
    transform: scale(0.97) !important;
}
