:root {
    --primary-color: #FFDF00;
    --secondary-color: #004040;
    --text-dark: #333;
    --text-light: #fff;
    --bg-light: #f4f4f4;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    scroll-behavior: smooth;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

/* Header & Nav */
header {
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

.logo img {
    height: 50px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(0, 64, 64, 0.8), rgba(0, 64, 64, 0.8)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.client-name {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.presented-by {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.slogan {
    font-style: italic;
    opacity: 0.9;
}

/* Typography */
h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--secondary-color);
    text-align: center;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin-top: 30px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 600px; /* Ensure table doesn't cramp on tiny screens */
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

table th, table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 0.95rem;
}

table th {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: bold;
}

table tr:hover {
    background-color: rgba(255, 223, 0, 0.1);
}

.time-info {
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

/* Chatbot Widget */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    font-family: inherit;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid var(--secondary-color);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chatbot-button:hover {
    transform: scale(1.1);
}

.chatbot-button img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #eee;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    font-size: 0.9rem;
}

.message.bot {
    background: #f0f0f0;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background: var(--primary-color);
    color: var(--secondary-color);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chatbot-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    outline: none;
}

.chatbot-input button {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chatbot-input button#mic-btn {
    background: #f0f0f0;
    color: var(--secondary-color);
}

.chatbot-input button#mic-btn.listening {
    background: #ff4444;
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Outcomes List */
#outcomes ul {
    list-style: none;
    max-width: 800px;
    margin: auto;
}

#outcomes ul li {
    padding: 15px;
    background: #fff;
    margin-bottom: 10px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Downloads Section */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.download-card {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid #eee;
}

.download-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.highlight-card {
    border: 2px solid var(--secondary-color);
    background: linear-gradient(to bottom, #ffffff, #fffdf0);
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.download-icon-large {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.primary-dl {
    padding: 12px 30px;
    font-size: 1rem;
}

.trainer-img-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.trainer-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trainer-role {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.download-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-dl {
    display: inline-block;
    padding: 8px 15px;
    background: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-dl:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-about h3, .footer-social h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-about p {
    margin-bottom: 10px;
}

.footer-about a {
    color: var(--text-light);
    text-decoration: none;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 40px 0;
    }

    /* Fixed Header Improvement */
    header {
        padding: 0.5rem 0;
    }

    nav {
        flex-direction: column;
        padding: 5px;
    }

    .logo img {
        height: 35px;
        margin-bottom: 5px;
    }

    nav ul {
        width: 100%;
        justify-content: center;
        gap: 8px;
        padding: 5px 0;
    }

    nav ul li {
        margin: 0;
    }

    nav ul li a {
        font-size: 0.8rem;
        background: rgba(255, 255, 255, 0.1);
        padding: 5px 10px;
        border-radius: 15px;
    }

    #hero {
        height: 50vh;
        min-height: 350px;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    /* Better Table UX */
    .table-responsive {
        margin: 15px 0;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px; /* Ensure columns don't squash too much */
        font-size: 0.8rem;
    }

    /* Prevent body from scrolling awkwardly behind fixed elements on iOS */
    html, body {
        position: relative;
        overflow-x: hidden;
    }

/* Floating Chatbot on Mobile */
    .chatbot-container {
        position: fixed !important;
        /* Force the button much higher to guarantee it clears Safari's dynamic bottom bar */
        bottom: calc(85px + env(safe-area-inset-bottom, 0px)) !important;
        right: 20px !important;
        left: auto !important;
        top: auto !important;
        width: 65px !important;
        height: 65px !important;
        z-index: 1000000 !important;
        pointer-events: all !important;
        transform: none !important;
        -webkit-transform: none !important;
    }

    .chatbot-window {
        position: fixed !important;
        /* Positioned relative to the elevated button */
        bottom: calc(160px + env(safe-area-inset-bottom, 0px)) !important;
        left: 15px !important;
        right: 15px !important;
        width: auto !important;
        /* Ensure total height doesn't push the header off-screen */
        height: auto !important;
        max-height: calc(100dvh - 200px) !important;
        z-index: 1000001 !important;
        border-radius: 20px !important;
        box-shadow: 0 15px 50px rgba(0,0,0,0.5) !important;
        display: none;
    }

    .chatbot-window.active {
        display: flex !important;
    }

    .chatbot-button {
        width: 65px !important;
        height: 65px !important;
        /* Force GPU layer on the button specifically */
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    .social-icons {
        justify-content: center;
    }
}
