/* ---------- Base / Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

:root{
    --primary: #3a86ff;
    --secondary: #ff9e00;
    --accent: #ff006e;
    --light: #f8f9fa;
    --light-2: #c0c0c0;
    --dark: #212529;
    --success: #38b000;
    --muted: #6c757d;
    --border: #eaebec;
    --background: #ffffff;
    --foreground: #212529;
    --card-bg: #ffffff;
    --footer-bg: #f8f9fa;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Dark Mode */
[data-theme="dark"] {
    --primary: #5a9fff;
    --light: #1a1a2e;
    --light-2: #4a4a5a;
    --dark: #f8f9fa;
    --muted: #a0a0b0;
    --border: #2a2a3e;
    --background: #0f0f1a;
    --foreground: #e8e8f0;
    --card-bg: #1a1a2e;
    --footer-bg: #1a1a2e;
    --shadow: rgba(0, 0, 0, 0.3);
}

html, body { 
    height: 100%; 
    scroll-behavior: smooth;
}
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  color: var(--foreground);
  background-color: var(--background);
  line-height:1.6;
}

.container {
    width: 100%;
    /* max-width: 1440px; */
    max-width: 560px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header Styles - Mobile First ---------- */
.site-header {
    background-color: var(--background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.5rem 0;
}

.site-header .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 768px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.5rem;
}

.logo__name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 1rem 2rem;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.main-nav.active {
    display: flex;
}

.nav-link {
    padding: 0.75rem 0;
    text-decoration: none;
    color: var(--foreground);
    font-weight: 500;
    text-align: center;
    border-radius: 10px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
    background-color: var(--primary);
    color: white;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    height: 30px;
    width: 30px;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--foreground);
    transition: background-color 0.2s, color 0.2s;
}

.mobile-menu-btn:hover {
    background-color: var(--primary);
    color: white;
    border-radius: 4px;
}

/* ---------- Hero Styles - Mobile First ---------- */
.hero {
    display: flex;
    width: 100%;
    padding: 5rem 0;
    background-color: var(--light);
}

.hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--light);
}

.hero__image {
    position: relative;
    width: 15rem;
    height: 15rem;
    object-fit: cover;
}

.hero__title {
    margin: 0;
    color: var(--primary);
    font-size: 4rem;
}

.hero__tagline {
    color: var(--muted);
    font-weight: 500;
    margin-top: 0;
    /* margin-bottom: 5rem; */
    font-size: 1rem;
    animation: fade-n-slide 1.5s ease-in-out;
}

@keyframes fade-n-slide {
    0% { 
        opacity: 0%;
        transform: translateX(-10px);
    }

    25% {
        opacity: 25%;
    }

    50% {
        opacity: 50%;
    }

    75% {
        opacity: 75%;
    }

    100% { 
        opacity: 100%;
    }
}

/* ---------- Featured Articles Styles - Mobile First ---------- */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin: 2rem 0 1rem 0;
    color: var(--primary);
}

.featured-articles__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem 2rem 1rem;
}

.card {
    display: grid;
    grid-template-rows: 200px auto 1fr auto;
    /* grid-template-rows: repeat(auto, 1fr); */
    background-color: var(--light);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.card:hover img {
    transform: scale(1.05);
}

.card h4 {
    margin: 1rem;
    color: var(--dark);
    font-size: 1.25rem;
    align-self: start;
    min-height: 4rem;
}

.card p { 
    margin: 0 1rem 1rem 1rem;
    /* background-color: red; */
    color: var(--muted);
    align-self: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1rem;
}

.card img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    transition: transform 0.2s ease;
}

.btn-read-article {
    margin: 0 1rem 1rem;
    text-decoration: none;
    align-self: end;
    text-align: center;
    background: var(--border);
    color: var(--foreground);
    border-radius: 0.5rem;
    padding: 0.6rem 2rem;
    width: calc(100% - 2rem);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.btn-read-article:hover {
    background-color: var(--primary);
    border: none;
    color: white;
}

/* ---------- Pets Styles - Mobile First ---------- */
.pet-category__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* background: rgb(228, 245, 255); LIGHT BLUE */
    background: var(--light);
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 3rem;
    gap: 1rem;
    transition: all 0.2s ease;
}

.pet-category__content:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.pet-category__image {
    width: 100%;
    height: 15rem;
    object-fit: contain;
}

.pet-category__text-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pet-category__title {
    text-align: center;
    margin: 0;
}

.pet-category__description {
    text-align: center;
    color: var(--muted);
    margin: 0 0 1rem 0;
}

.pet-category__cta {
    margin: 0 1rem 1rem;
    text-decoration: none;
    align-self: center;
    text-align: center;
    background: var(--dark);
    color: var(--light);
    border-radius: 0.5rem;
    padding: 0.6rem 2rem;
    width: auto;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.pet-category__cta:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
    border: none;
    color: white;
}

/* ---------- Footer Styles - Mobile First ---------- */
.site-footer {
    background-color: var(--footer-bg);
    /* background-color: red; */
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

.btn-contact-us {
    display: inline-block;
    text-decoration: none;
    background: var(--dark);
    color: var(--light);
    border-radius: 0.5rem;
    padding: 0.6rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.btn-contact-us:hover {
    background-color: var(--primary);
    border: none;
    color: white;
    transform: translateY(-2px);
}


/* Desktop styles */
@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }

    .container {
        max-width: 768px;
    }

    .site-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        max-width: 768px;
    }

    .logo {
        padding: 0.5rem 0;
        width: auto;
        justify-content: flex-start;
    }

    .main-nav {
        display: flex !important;
        position: static;
        top: 0;
        box-shadow: none;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        width: auto;
        padding: 0;
        gap: 2rem;
    }

    .nav-link {
        padding: 0.5rem 0;
        transition: color 0.2s, transform 0.2s;
    }

    .nav-link:hover {
        background-color: transparent;
        color: var(--primary);
        transform: translateY(-2px);
    }

    .featured-articles__grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1rem 2rem 1rem;
    }

    .pet-category__content {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: center;
    }

    .pet-category:nth-child(odd) .pet-category__content {
        flex-direction: row-reverse;
    }

    .pet-category__image {
        width: 200px;
        height: 250px;
        object-fit: contain;
        border-radius: 1rem;
        flex-shrink: 0;
    }

    .pet-category__text-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        padding: 0 1rem 0 0;
    }
    
    .pet-category:nth-child(odd) .pet-category__text-content {
        padding: 0 0 0 1rem;
    }

    .pet-category__title {
        text-align: center;
        margin: 0;
    }

    .pet-category__description {
        text-align: justify;
        margin: 0 0 1rem 0;
    }

    .pet-category__cta {
        width: auto;
        align-self: center;
    }

    .site-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
        background: var(--footer-bg);
    }

    .site-footer .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

@media (min-width: 1200px) {
    .mobile-menu-btn {
        display: none;
    }

    .container {
        max-width: 1200px;
    }

    .site-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        max-width: 1200px;
    }

    .logo {
        padding: 0.5rem 0;
        width: auto;
        justify-content: flex-start;
    }

    .main-nav {
        display: flex !important;
        position: static;
        top: 0;
        box-shadow: none;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        width: auto;
        padding: 0;
        gap: 2rem;
    }

    .nav-link {
        padding: 0.5rem 0;
        transition: color 0.2s, transform 0.2s;
    }

    .nav-link:hover {
        background-color: transparent;
        color: var(--primary);
        transform: translateY(-2px);
    }

    .hero__title {
        font-size: 5rem;
    }

    .hero__tagline {
        max-width: 768px;
        font-size: 1.1rem
    }

    .hero__image {
        width: 16rem;
        height: 16rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .section-description {
        font-size: 1.15rem;
    }

    .featured-articles__grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        padding: 0 1rem 2rem 1rem;
    }

    .pet-category .container {
        max-width: 1000px;
    }

    .pet-category__content {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: center;
    }

    .pet-category:nth-child(odd) .pet-category__content {
        flex-direction: row-reverse;
    }

    .pet-category__image {
        width: 350px;
        height: 300px;
        object-fit: contain;
        border-radius: 1rem;
        flex-shrink: 0;
    }

    .pet-category__text-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        padding: 0 2rem 0 0;
    }

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

    .pet-category__description {
        text-align: justify;
    }

    .pet-category__cta {
        width: auto;
        align-self: center;
    }

    .site-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
        background: var(--footer-bg);
    }

    .site-footer .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--footer-bg)
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1440px;
    }

    .site-header .container {
        max-width: 1440px;
    }

    .hero__title {
        font-size: 7rem;
    }

    .hero__tagline {
        max-width: 768px;
        font-size: 1.5rem
    }

    .hero__image {
        width: 25rem;
        height: 25rem;
    }

    .section-title {
        font-size: 3rem;
    }

    .section-description {
        font-size: 1.25rem;
    }
}

/* ---------- Chatbot Styles ---------- */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(58, 134, 255, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: white;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(58, 134, 255, 0.5);
}

.chatbot-toggle .close-icon {
    display: none;
}

.chatbot-container.open .chatbot-toggle .chat-icon {
    display: none;
}

.chatbot-container.open .chatbot-toggle .close-icon {
    display: block;
}

.chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: var(--background);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.2s ease;
}

.chatbot-container.open .chatbot-window {
    display: flex;
}

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

.chatbot-header {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chatbot-status {
    font-size: 0.75rem;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--light);
}

.chat-message {
    display: flex;
    max-width: 85%;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.bot-message .message-content {
    background: var(--background);
    color: var(--foreground);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing indicator */
.typing-indicator .message-content {
    display: flex;
    gap: 4px;
    padding: 16px 20px;
}

.typing-indicator .dot {
    width: 8px;
    height: 8px;
    background: var(--muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

.chatbot-input-container {
    display: flex;
    padding: 15px;
    gap: 10px;
    background: var(--background);
    border-top: 1px solid var(--border);
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--background);
    color: var(--foreground);
}

.chatbot-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.1);
}

.chatbot-input::placeholder {
    color: var(--muted);
}

.chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(58, 134, 255, 0.4);
}

.chatbot-send svg {
    margin-left: 2px;
}

/* Chatbot article links */
.chatbot-article-link {
    display: block;
    color: var(--primary);
    text-decoration: none;
    padding: 8px 12px;
    margin: 4px 0;
    background: var(--light);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    transition: all 0.2s ease;
    font-weight: 500;
}

.chatbot-article-link:hover {
    background: rgba(58, 134, 255, 0.1);
    transform: translateX(4px);
}

.bot-message .message-content strong {
    color: var(--dark);
}

/* Mobile adjustments for chatbot */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 15px;
        right: 15px;
    }

    .chatbot-toggle {
        width: 55px;
        height: 55px;
    }

    .chatbot-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: -7px;
    }

    .chatbot-messages {
        padding: 15px;
    }

    .message-content {
        font-size: 0.85rem;
    }

    .chatbot-article-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}


/* ---------- Theme Toggle ---------- */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    font-size: 1.25rem;
}

.theme-toggle:hover {
    background-color: var(--light);
}

.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }

[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

/* ---------- Search Styles ---------- */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    color: var(--foreground);
}

.search-toggle:hover {
    background-color: var(--light);
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.search-overlay.active {
    display: flex;
}

.search-modal {
    background: var(--background);
    border-radius: 1rem;
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
}

.search-input-wrapper svg {
    color: var(--muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    background: transparent;
    color: var(--foreground);
}

.search-input::placeholder {
    color: var(--muted);
}

.search-close {
    background: var(--light);
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted);
    cursor: pointer;
}

.search-results {
    max-height: calc(70vh - 70px);
    overflow-y: auto;
    padding: 0.5rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--foreground);
    border-radius: 0.5rem;
}

.search-result-item:hover {
    background-color: var(--light);
}

.search-result-icon {
    font-size: 1.5rem;
}

.search-result-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--foreground);
}

.search-result-info p {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.search-no-results {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
}

.search-hint {
    padding: 1rem 1.5rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* ---------- Scroll Progress Indicator ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    z-index: 1001;
    transition: width 0.1s ease-out;
}


/* ---------- Nav Actions ---------- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .nav-actions {
        margin-top: 0;
        margin-left: 1rem;
    }
}
