/* ============================================
   PawPaw Spa & Clinic - Global Styles
   ============================================ */

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #1a1a1a;
    --accent-color: #ffd93d;
    --light-bg: #f9f9f9;
    --border-color: #e0e0e0;
    --text-dark: #333;
    --text-light: #666;
    --success: #51cf66;
    --warning: #ffa94d;
    --error: #ff6b6b;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* account for sticky header */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: white;
    overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--secondary-color);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--secondary-color);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--secondary-color);
}

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

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

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

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

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

.btn:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

/* ============================================
   Container & Layout
   ============================================ */

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

.section {
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    margin-bottom: 15px;
}

.section-title p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.logo img {
    height: 60px;
    width: auto;
}

/* Utility helpers used across pages */
.bg-light { background: var(--light-bg); }
.bg-secondary { background: var(--secondary-color); }
.text-white { color: #fff; }
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.fs-1-1 { font-size: 1.1rem; }
.text-white-90 { color: rgba(255,255,255,.9); }
.d-flex { display: flex; }
.gap-15 { gap: 15px; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.border-white { border-color: #fff !important; }
.mt-15 { margin-top: 15px; }
.mt-10 { margin-top: 10px; }
.text-dark { color: var(--secondary-color); }

/* Icon cards gradients */
.card-icon-bg { display:flex; align-items:center; justify-content:center; color:#fff; font-size: clamp(2.5rem, 4vw, 4rem); }
.bg-primary-gradient { background: linear-gradient(135deg, #ff6b6b, #ff8787); }
.bg-secondary-gradient { background: linear-gradient(135deg, #4ecdc4, #44b5b0); }
.bg-accent-gradient { background: linear-gradient(135deg, #ffd93d, #ffed4e); }
.bg-home-gradient { background: linear-gradient(135deg, #a8edea, #fed6e3); }
.bg-surgery-gradient { background: linear-gradient(135deg, #ff9a56, #ff7e5f); }
.bg-store-gradient { background: linear-gradient(135deg, #667eea, #764ba2); }

/* Utility helpers used across pages */
.bg-light { background: var(--light-bg); }
.bg-secondary { background: var(--secondary-color); }
.text-white { color: #fff; }
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.fs-1-1 { font-size: 1.1rem; }
.text-white-90 { color: rgba(255,255,255,.9); }
.d-flex { display: flex; }
.gap-15 { gap: 15px; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.border-white { border-color: #fff !important; }
.mt-15 { margin-top: 15px; }
.mt-10 { margin-top: 10px; }

/* Icon cards gradients */
.card-icon-bg { display:flex; align-items:center; justify-content:center; color:#fff; font-size: clamp(2.5rem, 4vw, 4rem); }
.bg-primary-gradient { background: linear-gradient(135deg, #ff6b6b, #ff8787); }
.bg-secondary-gradient { background: linear-gradient(135deg, #4ecdc4, #44b5b0); }
.bg-accent-gradient { background: linear-gradient(135deg, #ffd93d, #ffed4e); color:#333; }

nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

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

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    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: var(--secondary-color);
    border-radius: 2px;
    transition: var(--transition);
}

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

.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2d2d2d 100%);
    color: white;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="1200" height="600" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
}

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

.hero h1 {
    color: white;
    margin-bottom: 20px;
    font-size: clamp(2.5rem, 6vw, 4rem);
}

.hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Cards & Grid
   ============================================ */

.grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

.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));
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--light-bg);
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.card-text {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   Forms
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

input, textarea, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ============================================
   Features Section
   ============================================ */

.feature {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature h3 {
    margin-bottom: 10px;
}

/* ============================================
   Testimonials
   ============================================ */

.testimonial {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.testimonial-author {
    font-weight: 600;
    color: var(--secondary-color);
}

.testimonial-rating {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

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

footer {
    background: var(--secondary-color);
    color: white;
    padding: 50px 20px 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-section h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

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

.footer-section a:hover {
    color: var(--primary-color);
}

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

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

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 20px;
        box-shadow: var(--shadow-md);
    }

    nav.active {
        display: flex;
    }

    nav a {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .hero {
        padding: 60px 20px;
    }

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

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

    .hero-buttons .btn {
        width: 100%;
    }

    .logo img {
        height: 44px;
    }
    .logo span {
        font-size: 1rem;
        line-height: 1.1;
    }

    .section {
        padding: 40px 20px;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ============================================
   Map Container
   ============================================ */

.map-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    background: #e0e0e0; /* Placeholder color */
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .logo img {
        height: 38px;
    }
    .logo span {
        font-size: 0.9rem;
        line-height: 1.1;
        max-width: 150px;
        white-space: normal;
    }

    nav {
        top: 60px;
    }

    .hero {
        padding: 40px 15px;
    }

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

    .hero p {
        font-size: 1rem;
    }

    .section {
        padding: 30px 15px;
    }

    .card-image {
        height: 200px;
    }

    .card-content {
        padding: 20px;
    }
}

/* ============================================
   Pricing Tables (Grooming)
   ============================================ */

#grooming-pricing table { width: 100%; border-collapse: collapse; }
#grooming-pricing th, #grooming-pricing td { padding: 10px; border-bottom: 1px solid var(--border-color); }
#grooming-pricing th { text-align: left; color: var(--secondary-color); }
#grooming-pricing td:last-child { text-align: right; }
/* Show only Service and Price (hide Pet and Duration columns) */
#grooming-pricing th:nth-child(2),
#grooming-pricing td:nth-child(2),
#grooming-pricing th:nth-child(3),
#grooming-pricing td:nth-child(3) {
  display: none;
}

/* Mobile: convert table rows into cards */
@media (max-width: 768px) {
  #grooming-pricing thead { display: none; }
  #grooming-pricing table, #grooming-pricing tbody, #grooming-pricing tr, #grooming-pricing td { display: block; width: 100%; }
  #grooming-pricing tr {
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    background: white;
  }
  #grooming-pricing td { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border: 0; }
  #grooming-pricing td:nth-child(1)::before { content: "Service"; font-weight: 600; color: var(--text-dark); margin-right: 10px; }
  #grooming-pricing td:nth-child(2)::before { content: "Pet"; font-weight: 600; color: var(--text-dark); margin-right: 10px; }
  #grooming-pricing td:nth-child(3)::before { content: "Duration"; font-weight: 600; color: var(--text-dark); margin-right: 10px; }
  #grooming-pricing td:nth-child(4)::before { content: "Price"; font-weight: 600; color: var(--text-dark); margin-right: 10px; }
  #grooming-pricing td:nth-child(5)::before { content: "Action"; font-weight: 600; color: var(--text-dark); margin-right: 10px; }
  #grooming-pricing td .btn { width: 100%; margin-top: 8px; margin-left: 0; }
}

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

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

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

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gap-20 {
    gap: 20px;
}

.opacity-50 {
    opacity: 0.5;
}

.rounded {
    border-radius: 8px;
}

.shadow {
    box-shadow: var(--shadow-md);
}

/* ============================================
   Loading & States
   ============================================ */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.slide-in {
    animation: slideIn 0.6s ease-out;
}

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #f0f0f0;
    }

    .card {
        background: #2d2d2d;
        border-color: #444;
    }

    input, textarea, select {
        background: #2d2d2d;
        color: #f0f0f0;
        border-color: #444;
    }
}
