/* ============================================
   CLIL for Veterinarians - Main Stylesheet
   ============================================ */

/* ===== CSS Variables ===== */
:root {
    --primary-blue: #2563eb;
    --primary-green: #10b981;
    --dark-blue: #1e40af;
    --dark-green: #059669;
    --light-blue: #dbeafe;
    --light-green: #d1fae5;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* ===== Header & Navigation ===== */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-placeholder {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

nav ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

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

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

/* ===== Main Content ===== */
main {
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--light-green) 100%);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    animation: fadeInUp 0.8s ease;
}

.hero .tagline {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-image {
    width: 100%;
    max-width: 600px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    border-radius: 12px;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--primary-green);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* ===== Cards ===== */
.card {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ===== Grid Layouts ===== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ===== Feature Cards ===== */
.features {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.feature-card {
    text-align: center;
    cursor: pointer;
}

.feature-card .card-icon {
    margin: 0 auto 1.5rem;
}

/* ===== Stats Section ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* ===== Accordion ===== */
.accordion {
    margin-bottom: 1rem;
}

.accordion-header {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.accordion-header:hover {
    background-color: var(--light-blue);
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.accordion-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.accordion.active .accordion-content {
    max-height: 1000px;
    padding: 1.5rem;
}

/* ===== Tabs ===== */
.tabs {
    margin-bottom: 2rem;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-button {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tab-button:hover {
    color: var(--primary-blue);
}

.tab-button.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-error.show {
    display: block;
}

.form-success {
    background-color: var(--light-green);
    color: var(--dark-green);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

.form-success.show {
    display: block;
}

/* ===== Search Bar ===== */
.search-container {
    margin-bottom: 2rem;
}

.search-bar {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-bar:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== Alphabet Navigation ===== */
.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.alphabet-btn {
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.alphabet-btn:hover,
.alphabet-btn.active {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* ===== Glossary Terms ===== */
.glossary-grid {
    display: grid;
    gap: 1.5rem;
}

.glossary-term {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: var(--transition);
}

.glossary-term:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-blue);
}

.glossary-term h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.glossary-term .definition {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.glossary-term .translation {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.glossary-term .example {
    color: var(--text-light);
    font-style: italic;
    border-left: 3px solid var(--primary-green);
    padding-left: 1rem;
}

.term-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.category-pill {
    background-color: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.pronunciation-btn {
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
}

/* ===== Quiz ===== */
.quiz-container {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.quiz-question {
    margin-bottom: 2rem;
}

.quiz-question h3 {
    margin-bottom: 1rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    padding: 1rem;
    background-color: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.quiz-option:hover {
    background-color: var(--light-blue);
    border-color: var(--primary-blue);
}

.quiz-option.selected {
    background-color: var(--light-blue);
    border-color: var(--primary-blue);
}

.quiz-option.correct {
    background-color: var(--light-green);
    border-color: var(--primary-green);
}

.quiz-option.incorrect {
    background-color: #fee2e2;
    border-color: #ef4444;
}

.quiz-result {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.quiz-result.show {
    display: block;
}

.quiz-result.success {
    background-color: var(--light-green);
    color: var(--dark-green);
}

.quiz-result.error {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ===== Image Gallery ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 1;
}

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

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

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-white);
    border-radius: 12px;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-dark);
    z-index: 1;
}

.modal-close:hover {
    color: var(--primary-blue);
}

/* ===== Footer ===== */
footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    padding-left: 0.5rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-blue);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.author-signature {
    margin-top: 1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    background-color: var(--dark-blue);
    transform: translateY(-3px);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    nav ul {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
        gap: 1rem;
    }

    nav ul.active {
        left: 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .tagline {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .section {
        padding: 2rem 0;
    }

    .container {
        padding: 1rem;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .tab-buttons {
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
        text-align: left;
    }

    .alphabet-nav {
        gap: 0.25rem;
    }

    .alphabet-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.hidden {
    display: none;
}


