/*
 Theme Name:   POA 2026 Submission Portal
 Theme URI:    https://poa.ten-toes.net
 Description:  Custom theme for POA 2026 International Conference Submission Portal. Based on Twenty Twenty-Five with healthy, energetic, and fresh design.
 Author:       POA 2026 Web Team
 Author URI:   https://poa.ten-toes.net
 Template:     twentytwentyfive
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  poa2026-theme
 Tags:         conference, medical, multilingual, academic
*/

/* ==========================================================================
   POA 2026 Color Palette - Healthy, Energetic, Fresh
   ========================================================================== */

:root {
    /* Primary Colors */
    --poa-teal: #2A9D8F;           /* Fresh teal - health, digital tech */
    --poa-coral: #E63946;          /* Vibrant coral - heart, cardiovascular */
    --poa-navy: #1D3557;           /* Deep navy - professional, medical */
    --poa-orange: #F4A261;         /* Warm orange - friendly, energetic */

    /* Secondary Colors */
    --poa-light-blue: #A8DADC;     /* Light blue - background accent */
    --poa-ivory: #F1FAEE;          /* Ivory white - main background */
    --poa-blue-gray: #457B9D;      /* Blue gray - text, secondary */

    /* Functional Colors */
    --poa-white: #FFFFFF;
    --poa-black: #1A1A2E;
    --poa-gray-light: #F8F9FA;
    --poa-gray: #6C757D;
    --poa-success: #28A745;
    --poa-warning: #FFC107;
    --poa-error: #DC3545;
}

/* ==========================================================================
   Global Styles
   ========================================================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--poa-ivory);
    color: var(--poa-navy);
    line-height: 1.7;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--poa-navy);
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: var(--poa-teal);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--poa-coral);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.wp-site-blocks header,
header.wp-block-template-part {
    background: linear-gradient(135deg, var(--poa-navy) 0%, var(--poa-blue-gray) 100%);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Site Logo */
.wp-block-site-logo img {
    max-height: 60px;
    width: auto;
}

/* Navigation */
.wp-block-navigation {
    font-weight: 500;
}

.wp-block-navigation a {
    color: var(--poa-white) !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.wp-block-navigation a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--poa-light-blue) !important;
}

/* Active Navigation Item */
.wp-block-navigation .current-menu-item a,
.wp-block-navigation a[aria-current="page"] {
    background-color: var(--poa-teal);
    color: var(--poa-white) !important;
}

/* ==========================================================================
   Hero Banner Section
   ========================================================================== */

.poa-hero,
.wp-block-cover.poa-hero {
    min-height: 500px;
    background: linear-gradient(135deg, var(--poa-navy) 0%, var(--poa-teal) 50%, var(--poa-coral) 100%);
    position: relative;
    overflow: hidden;
}

.poa-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.poa-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--poa-white);
    padding: 4rem 2rem;
}

.poa-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.poa-hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.poa-hero-date {
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.wp-block-button__link,
.poa-btn {
    background: linear-gradient(135deg, var(--poa-coral) 0%, #D62839 100%);
    color: var(--poa-white) !important;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wp-block-button__link:hover,
.poa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.5);
    background: linear-gradient(135deg, #D62839 0%, var(--poa-coral) 100%);
}

/* Secondary Button */
.wp-block-button.is-style-outline .wp-block-button__link,
.poa-btn-secondary {
    background: transparent;
    border: 2px solid var(--poa-teal);
    color: var(--poa-teal) !important;
    box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.poa-btn-secondary:hover {
    background: var(--poa-teal);
    color: var(--poa-white) !important;
    box-shadow: 0 4px 15px rgba(42, 157, 143, 0.4);
}

/* ==========================================================================
   Cards & Sections
   ========================================================================== */

.poa-card,
.wp-block-group.poa-card {
    background: var(--poa-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.poa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.poa-section {
    padding: 4rem 2rem;
}

.poa-section-title {
    text-align: center;
    color: var(--poa-navy);
    margin-bottom: 3rem;
    position: relative;
}

.poa-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--poa-teal), var(--poa-coral));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ==========================================================================
   Welcome Section
   ========================================================================== */

.poa-welcome {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 2rem;
    background: var(--poa-white);
}

.poa-chair-photo {
    text-align: center;
}

.poa-chair-photo img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--poa-teal);
    box-shadow: 0 4px 20px rgba(42, 157, 143, 0.3);
}

.poa-chair-name {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--poa-navy);
}

.poa-chair-title {
    color: var(--poa-gray);
    font-size: 0.9rem;
}

.poa-welcome-text {
    line-height: 1.8;
    color: var(--poa-navy);
}

/* ==========================================================================
   Highlights Section
   ========================================================================== */

.poa-highlights {
    background: linear-gradient(180deg, var(--poa-ivory) 0%, var(--poa-light-blue) 100%);
    padding: 4rem 2rem;
}

.poa-highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.poa-highlight-card {
    background: var(--poa-white);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid var(--poa-teal);
}

.poa-highlight-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.poa-highlight-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--poa-teal) 0%, var(--poa-blue-gray) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--poa-white);
    font-size: 1.5rem;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.poa-cta {
    background: linear-gradient(135deg, var(--poa-coral) 0%, var(--poa-orange) 100%);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--poa-white);
}

.poa-cta h2 {
    color: var(--poa-white);
    margin-bottom: 1rem;
}

.poa-deadline {
    font-size: 1.5rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    margin: 1rem 0 2rem;
    backdrop-filter: blur(10px);
}

.poa-cta .poa-btn {
    background: var(--poa-white);
    color: var(--poa-coral) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.poa-cta .poa-btn:hover {
    background: var(--poa-navy);
    color: var(--poa-white) !important;
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */

.poa-gallery {
    padding: 4rem 2rem;
    background: var(--poa-white);
}

.poa-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.poa-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16/10;
}

.poa-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.poa-gallery-item:hover img {
    transform: scale(1.1);
}

.poa-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: var(--poa-white);
    padding: 2rem 1rem 1rem;
    font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer.wp-block-template-part,
.wp-site-blocks footer {
    background: var(--poa-navy);
    color: var(--poa-white);
    padding: 3rem 2rem;
}

footer a {
    color: var(--poa-light-blue);
}

footer a:hover {
    color: var(--poa-teal);
}

.poa-footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.poa-footer-logos img {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.poa-footer-logos img:hover {
    opacity: 1;
}

/* ==========================================================================
   Language Switcher
   ========================================================================== */

.poa-lang-switcher,
.polylang-switcher,
.poa-header-lang-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.poa-lang-switcher ul,
.polylang-switcher ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.poa-lang-switcher li,
.polylang-switcher li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.poa-lang-switcher a,
.polylang-switcher a,
.menu-item-language-switcher a {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: var(--poa-white) !important;
    transition: all 0.3s ease;
}

.poa-lang-switcher a:hover,
.polylang-switcher a:hover,
.menu-item-language-switcher a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.poa-lang-switcher .current-lang a,
.poa-lang-switcher a.current-lang,
.polylang-switcher .current-lang a,
.menu-item-language-switcher .current-lang a {
    background: var(--poa-teal);
    color: var(--poa-white) !important;
}

/* Hide old language switcher from plugin */
body > div.poa-global-lang-switcher {
    display: none !important;
}

/* New Polylang Language Switcher - Compact, Top-Right, Horizontal */
/* Positioned absolutely within the page, not fixed to viewport */
.poa-polylang-switcher-fixed {
    position: absolute;
    top: 0;
    right: 15px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    padding: 0;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.poa-polylang-switcher-fixed ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.poa-polylang-switcher-fixed li {
    display: inline-block;
    list-style: none;
    margin: 0;
    padding: 0;
    border-right: 1px solid #e0e0e0;
}

.poa-polylang-switcher-fixed li:last-child {
    border-right: none;
}

.poa-polylang-switcher-fixed a {
    display: inline-block;
    padding: 6px 12px;
    color: #555 !important;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.2s;
    background: transparent;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.poa-polylang-switcher-fixed a:hover {
    background: #f0f0f0 !important;
    color: #333 !important;
}

.poa-polylang-switcher-fixed .current-lang a,
.poa-polylang-switcher-fixed a.current-lang {
    background: var(--poa-teal) !important;
    color: #ffffff !important;
}

/* Navigation Menu Language Switcher */
.menu-item-language-switcher {
    display: flex;
    align-items: center;
}

.menu-item-language-switcher ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .poa-polylang-switcher-fixed {
        top: 0;
        right: 10px;
    }

    .poa-polylang-switcher-fixed a {
        font-size: 10px;
        padding: 5px 8px;
    }

    .poa-lang-switcher a,
    .polylang-switcher a,
    .menu-item-language-switcher a {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}

/* ==========================================================================
   Forms (Submission System)
   ========================================================================== */

.poa-form input[type="text"],
.poa-form input[type="email"],
.poa-form textarea,
.poa-form select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--poa-light-blue);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--poa-white);
}

.poa-form input:focus,
.poa-form textarea:focus,
.poa-form select:focus {
    outline: none;
    border-color: var(--poa-teal);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.2);
}

.poa-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--poa-navy);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .poa-hero-title {
        font-size: 2.5rem;
    }

    .poa-welcome {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .poa-hero-title {
        font-size: 2rem;
    }

    .poa-hero-subtitle {
        font-size: 1.2rem;
    }

    .poa-section {
        padding: 2rem 1rem;
    }

    .poa-highlights-grid {
        grid-template-columns: 1fr;
    }

    .wp-block-navigation {
        flex-direction: column;
    }

    .poa-footer-logos {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .poa-hero-title {
        font-size: 1.75rem;
    }

    .wp-block-button__link,
    .poa-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .poa-card {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.poa-text-center { text-align: center; }
.poa-text-left { text-align: left; }
.poa-text-right { text-align: right; }

.poa-mt-1 { margin-top: 0.5rem; }
.poa-mt-2 { margin-top: 1rem; }
.poa-mt-3 { margin-top: 1.5rem; }
.poa-mt-4 { margin-top: 2rem; }

.poa-mb-1 { margin-bottom: 0.5rem; }
.poa-mb-2 { margin-bottom: 1rem; }
.poa-mb-3 { margin-bottom: 1.5rem; }
.poa-mb-4 { margin-bottom: 2rem; }

.poa-py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.poa-px-4 { padding-left: 2rem; padding-right: 2rem; }

.poa-bg-teal { background-color: var(--poa-teal); }
.poa-bg-coral { background-color: var(--poa-coral); }
.poa-bg-navy { background-color: var(--poa-navy); }
.poa-bg-ivory { background-color: var(--poa-ivory); }

.poa-text-teal { color: var(--poa-teal); }
.poa-text-coral { color: var(--poa-coral); }
.poa-text-navy { color: var(--poa-navy); }
.poa-text-white { color: var(--poa-white); }

/* ==========================================================================
   Animation
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.poa-animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Pulse animation for CTA */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(230, 57, 70, 0.6);
    }
}

.poa-cta .poa-btn-pulse {
    animation: pulse 2s infinite;
}

/* ==========================================================================
   Hero Gallery Slideshow (Taipei Scenic)
   ========================================================================== */

.poa-hero-gallery {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
}

.poa-hero-gallery .poa-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.poa-hero-gallery .poa-hero-slide:not(:first-child) {
    display: none;
}

.poa-hero-gallery .poa-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.poa-hero-gallery .poa-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(29, 53, 87, 0.7) 0%, rgba(42, 157, 143, 0.5) 50%, rgba(230, 57, 70, 0.4) 100%);
    z-index: 1;
}

.poa-hero-gallery .poa-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--poa-white);
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.poa-hero-gallery .poa-hero-caption {
    position: absolute;
    bottom: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 3;
    backdrop-filter: blur(5px);
}

/* Gallery navigation dots */
.poa-hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.poa-hero-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.poa-hero-dots .dot.active,
.poa-hero-dots .dot:hover {
    background: var(--poa-white);
    transform: scale(1.2);
}

/* ==========================================================================
   Conference Venue with Image
   ========================================================================== */

.poa-venue-with-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.poa-venue-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.poa-venue-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.poa-venue-image:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .poa-venue-with-image {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Custom Footer (Contact + Organizers)
   ========================================================================== */

.poa-custom-footer {
    background: var(--poa-navy);
    color: var(--poa-white);
    padding: 0;
}

.poa-footer-contact {
    background: #F1FAEE;
    padding: 60px 20px;
}

.poa-footer-organizers {
    background: var(--poa-navy);
    padding: 50px 20px;
    text-align: center;
}

.poa-footer-organizers h3 {
    color: var(--poa-white);
    margin-bottom: 25px;
}

.poa-footer-copyright {
    background: #162a45;
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--poa-light-blue);
}

.poa-footer-copyright a {
    color: var(--poa-teal);
}

/* Hide Twenty Twenty-Five Footer */
body.poa-lang-en footer.wp-block-template-part:last-of-type,
body.poa-lang-zh-tw footer.wp-block-template-part:last-of-type,
body.poa-lang-ja footer.wp-block-template-part:last-of-type,
body.poa-lang-ko footer.wp-block-template-part:last-of-type,
.poa-landing-page + footer.wp-block-template-part {
    display: none !important;
}
