/* index.css — Optimized for Animal Ark Pet Care Center */

/* 1. GLOBAL SAFETY FIX: Prevents horizontal scrolling */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html, body {
    max-width: 100vw;
    overflow-x: hidden; /* This kills the horizontal swipe/space */
    width: 100%;
}

:root {
    --teal:        #08618d;
    --teal-dark:   #065073;
    --teal-light: #e0f4ff;
    --dark:        #0f172a;
    --gray:        #6b7280;
    --light:       #f8fafc;
}

html { scroll-behavior: smooth; }
body { 
    font-family: Arial, sans-serif; 
    font-size: 15px; 
    color: #1f2937; 
    background: #fff; 
    line-height: 1.6; 
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ── NAVBAR ───────────────────────────────────────────────────── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: #fff; border-bottom: 1px solid #e5e7eb; height: 64px;
    display: flex; align-items: center; padding: 0 6%;
    justify-content: center;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.nav-brand { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 700; color: var(--dark); }
.nav-brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.nav-links { display: flex; flex: 1; justify-content: center; gap: 24px; }
.nav-anchor { font-size: 13px; font-weight: 600; color: var(--gray); padding: 6px 14px; border-radius: 8px; transition: color 0.15s, background 0.15s; }
.nav-anchor:hover { color: var(--teal); background: var(--teal-light); }

.btn-nav {
    font-size: 13px; font-weight: 700; 
    padding: 8px 20px; border-radius: 9px; border: none; cursor: pointer;
    transition: background 0.15s; text-decoration: none; display: inline-block;
}
.btn-login    { background: var(--teal-light); color: var(--teal); }
.btn-register { background: var(--teal); color: #fff; margin-left: 4px; }
.btn-dashboard { background: var(--teal); color: #fff; }

/* ── HERO ─────────────────────────────────────────────────────── */
.hero {
    margin-top: 50px; background: var(--teal);
    padding: 42px 6% 40px;
    display: flex; align-items: center; gap: 10px; min-height: 250px;
}
.hero-text { flex: 1; color: #fff; }
.hero-title { font-size: 46px; font-weight: 700; line-height: 1.1; margin-bottom: 18px; }
.hero-title span { color: #7dd3fc; }
.hero-sub { font-size: 16px; color: #bae6fd; max-width: 440px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-hero-primary {
    background: #fff; color: var(--teal); font-weight: 700;
    padding: 13px 28px; border-radius: 10px; text-decoration: none; transition: 0.15s;
}
.btn-hero-secondary {
    background: transparent; color: #fff; font-weight: 700;
    padding: 13px 28px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.4);
}

.hero-image { flex: 0 0 340px; display: flex; flex-direction: column; gap: 12px; }
.hero-image img { width: 100%; border-radius: 18px; border: 4px solid rgba(255,255,255,0.2); }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-stat { background: rgba(255,255,255,0.12); border-radius: 12px; padding: 12px 16px; text-align: center; color: #fff; }

/* ── SERVICES ─────────────────────────────────────────────────── */
.services { background: var(--light); padding: 72px 6%; }
.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 16px; 
}
.service-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
    padding: 28px 20px; text-align: center; transition: 0.2s;
}
.service-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }

/* Icon Colors */
.ic-teal   { background: #e0f4ff; color: #08618d; }
.ic-green  { background: #dcfce7; color: #16a34a; }
.ic-amber  { background: #fef3c7; color: #b45309; }
.ic-purple { background: #ede9fe; color: #7c3aed; }
.ic-red    { background: #fee2e2; color: #dc2626; }

/* ── ABOUT & CONTACT ─────────────────────────────────────────── */
.about, .contact { padding: 72px 6%; }
.about-inner, .contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }

.about-image {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.about-image img {
    width: 100%;
    max-width: 340px;
    height: 340px;
    object-fit: contain;
    border-radius: 20px;
    background: #f0f9ff;
    padding: 12px;
}

.about-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}
.about-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e0f4ff;
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.about-features { margin-top: 24px; }
.about-feature h4 { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 3px; }
.about-feature p  { font-size: 13px; color: #6b7280; line-height: 1.5; }

.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--teal); }
.section-title { font-size: 28px; font-weight: 700; color: #111827; margin: 6px 0 10px; line-height: 1.2; }
.section-sub   { font-size: 14px; color: #6b7280; line-height: 1.6; max-width: 480px; }

.contact { background: var(--dark); color: #fff; }
.hours-box { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 28px; }


/* ── FOOTER ───────────────────────────────────────────────────── */
footer { background: #020617; color: #475569; text-align: center; padding: 22px 6%; font-size: 12px; }

/* ── RESPONSIVE FIXES (No Horizontal Scroll) ─────────────────── */

@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .hero { flex-direction: column; text-align: center; gap: 36px; padding-top: 48px; }
    .hero-image { flex: none; width: 100%; max-width: 360px; margin: 0 auto; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .about-inner, .contact-inner { grid-template-columns: 1fr; gap: 40px; }
    .about-image img { max-width: 260px; height: 260px; margin: 0 auto; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .navbar { padding: 0 16px; height: 56px;  }
    .nav-brand { font-size: 14px; }
    .nav-brand img { width: 32px; height: 32px; }
    .nav-anchor { display: none; } /* Standard for mobile */
    
    .hero { margin-top: 56px; padding: 40px 20px; }
    .hero-title { font-size: 28px; }
    
    .services-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    section { padding: 48px 20px; }
}

@media (max-width: 480px) {
    .services-grid { grid-template-columns: 1fr; } /* Single column for very small phones */
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .hero-actions { flex-direction: column; width: 100%; }
    .btn-hero-primary, .btn-hero-secondary { width: 100%; text-align: center; }
}

/* ── ANNOUNCEMENTS SECTION ────────────────────────────────────
   Append this block to the bottom of your index.css
   ──────────────────────────────────────────────────────────── */

.announcements-section {
    background: linear-gradient(135deg, #0f1e3d 0%, #08618d 100%);
    padding: 56px 0 40px;
    overflow: hidden;
    width: 100%;
}

.ann-header {
    text-align: center;
    padding: 0 6%;
    margin-bottom: 32px;
}
.ann-header .section-title { color: #fff; margin-top: 6px; }

/* Scrollable track wrapper — full width, no side padding */
.ann-track-wrap {
    width: 100%;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}
.ann-track-wrap:active { cursor: grabbing; }

.ann-track {
    display: flex;
    gap: 24px;
    padding: 8px 6%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.ann-track::-webkit-scrollbar { display: none; }

/* Individual card */
.ann-card {
    flex: 0 0 340px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 16px;
    overflow: hidden;
    scroll-snap-align: start;
    backdrop-filter: blur(8px);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.ann-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

.ann-card-img {
    width: 100%;
    height: 160px;
    overflow: hidden;
}
.ann-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ann-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.ann-card-icon {
    width: 36px; height: 36px;
    background: rgba(125,211,252,0.15);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #7dd3fc;
    font-size: 15px;
    flex-shrink: 0;
}

.ann-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.ann-card-text {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    flex: 1;
    /* Clamp to 4 lines */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ann-card-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: auto;
}
.ann-card-meta i { color: rgba(255,255,255,0.3); }

/* Dot indicators */
.ann-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
}
.ann-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    border: none;
}
.ann-dot.active {
    background: #7dd3fc;
    transform: scale(1.3);
}

/* Manage button (visible to admin/staff only) */
.ann-manage-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s;
}
.ann-manage-btn:hover { background: rgba(255,255,255,0.2); }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 640px) {
    .ann-card { flex: 0 0 280px; }
    .ann-card-img { height: 130px; }
    .ann-card-title { font-size: 14px; }
}
@media (max-width: 400px) {
    .ann-card { flex: 0 0 calc(100vw - 48px); }
}