/* ============================================
   Northern Veterinary Service - Main Styles
   ============================================ */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #2c5f7f;
    --secondary-color: #4a90b8;
    --accent-color: #5cb85c;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-gray: #e9ecef;
    --border-color: #dee2e6;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* ===== Reset and Base Styles ===== */
* {
    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);
    background-color: var(--bg-light);
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

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

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

.logo-section {
    margin-bottom: 1rem;
}

.site-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0;
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin: 0;
}

/* Navigation */
.navbar {
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-list li a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-list li a:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.nav-list li a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

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

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

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

.btn-secondary:hover {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

/* ===== Main Content ===== */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.content-section {
    background-color: var(--white);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.content-section h2 {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* ===== Services Grid ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ===== Pricing Tables ===== */
.pricing-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.pricing-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.pricing-category h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.table-pricing {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-pricing thead {
    background-color: var(--primary-color);
    color: var(--white);
}

.table-pricing th,
.table-pricing td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table-pricing tbody tr:hover {
    background-color: var(--bg-light);
}

.table-pricing tbody tr:last-child td {
    border-bottom: none;
}

.table-pricing td:last-child {
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
}

.pricing-note {
    text-align: center;
    font-style: italic;
    color: var(--text-light);
    margin-top: 1rem;
}

/* ===== Forms ===== */
form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

/* Form row for side-by-side fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 184, 0.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #dc3545;
}

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

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

input[type="submit"],
button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: #4a9d4a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Team Section ===== */
.team-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.staffbox {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

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

.staffPhoto {
    display: block;
    width: 200px;
    height: 200px;
    min-width: 200px;
    min-height: 200px;
    max-width: 200px;
    max-height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    margin: 0 auto 1rem auto;
    border: 4px solid var(--primary-color);
}

.staffbox h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 0;
}

.staff-title {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ===== Case Stories Gallery ===== */
.gallery-intro {
    text-align: center;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.caseimage {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.caseimage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.gallery-item .text {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== Footer ===== */
.site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-section a:hover {
    opacity: 1;
    text-decoration: underline;
}

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

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .content-section {
        padding: 1.5rem;
    }
    
    .pricing-tables {
        grid-template-columns: 1fr;
    }
    
    .table-pricing {
        font-size: 0.9rem;
    }
    
    .table-pricing th,
    .table-pricing td {
        padding: 0.75rem 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        right: 1rem;
        top: 1rem;
    }
    
    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .nav-list li {
        width: 100%;
    }
    
    .nav-list li a {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.4rem;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    
    .content-wrapper {
        padding: 1rem;
    }
    
    .gallery-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .team-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* ===== Authentication UI ===== */
.auth-section {
    position: absolute;
    top: 1rem;
    right: 2rem;
    z-index: 100;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-auth {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
    border: 2px solid;
    text-align: center;
    cursor: pointer;
}

.btn-login {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: #ffffff;
}

.btn-login:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-signup {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.btn-signup:hover {
    background-color: #1a4558;
    border-color: #1a4558;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-dark);
}

.user-dropdown-btn:hover {
    background-color: var(--bg-light);
}

.user-icon {
    font-size: 1.2rem;
}

.user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.user-dropdown-btn:hover .dropdown-arrow {
    transform: translateY(2px);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    box-shadow: var(--shadow-md);
    min-width: 180px;
    display: none;
    z-index: 1000;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Auth Pages */
.auth-page {
    padding: 3rem 0;
    min-height: 60vh;
}

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

.auth-container h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.auth-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer p {
    margin: 0.5rem 0;
}

.auth-footer a {
    color: var(--secondary-color);
    font-weight: 600;
}

.security-note {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal !important;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.btn-full {
    width: 100%;
}

.message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

/* Login Required Box (for protected content) */
.login-required-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.lock-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.login-required-box h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-required-box > p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.benefits-list {
    background-color: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 500px;
    text-align: left;
}

.benefits-list h3 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.benefits-list ul {
    list-style: none;
    padding: 0;
    line-height: 2;
}

.benefits-list ul li {
    padding-left: 0.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.contact-note {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.contact-note a {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Mobile responsive for auth */
@media (max-width: 768px) {
    .auth-section {
        position: static;
        margin-top: 1rem;
        padding: 1rem 0;
        text-align: center;
    }
    
    .auth-buttons {
        justify-content: center;
    }
    
    .user-dropdown-btn {
        margin: 0 auto;
    }
    
    .dropdown-menu {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
    
    .auth-container {
        padding: 1rem;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-large {
        width: 100%;
    }
    
    .login-required-box {
        padding: 2rem 1rem;
    }
}

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

.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.py-2 { padding-top: 2rem; padding-bottom: 2rem; }

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

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

/* ===== Case Stories Lightbox Modal ===== */
.case-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 50px;
    font-weight: bold;
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001;
    transition: var(--transition);
    line-height: 1;
    padding: 0;
    width: 50px;
    height: 50px;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--accent-color);
    transform: scale(1.1);
}

.modal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    height: 90%;
    max-width: 1400px;
}

.modal-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-caption {
    color: var(--white);
    text-align: center;
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    margin-top: 1rem;
    max-width: 800px;
}

.modal-counter {
    color: var(--white);
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    font-size: 40px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
}

.modal-nav:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 40px;
        width: 40px;
        height: 40px;
    }
    
    .modal-content {
        width: 95%;
        height: 95%;
    }
    
    .modal-image-container img {
        max-height: 70vh;
    }
    
    .modal-caption {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .modal-nav {
        font-size: 30px;
        padding: 0.75rem 1rem;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .modal-nav {
        font-size: 24px;
        padding: 0.5rem 0.75rem;
        background-color: rgba(255, 255, 255, 0.3);
    }
    
    .modal-prev {
        left: 5px;
    }
    
    .modal-next {
        right: 5px;
    }
    
    .modal-caption {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}

/* Gallery item cursor indication */
.gallery-item {
    cursor: pointer;
}
