/* ============================================================
   tehran.css — Dr. Rezvani Vet Clinic
   Tehran services hub styles
   Version: 3.0
   ============================================================ */

/* ------------------------------------------------------------
   1) Design tokens
   ------------------------------------------------------------ */
:root {
    --tehran-primary:      #E88A3E;
    --tehran-primary-dark: #d97742;
    --tehran-secondary:    #2d4059;
    --tehran-bg-light:     #f8f9fa;
    --tehran-text:         #2d3436;
    --tehran-muted:        #94a3b8;
    --tehran-border:       #e2e8f0;
    --tehran-card-bg:      #ffffff;
    --tehran-shadow:       0 4px 15px rgba(0, 0, 0, .06);
    --tehran-radius:       16px;
    --tehran-transition:   all .25s ease;
}

/* ------------------------------------------------------------
   2) Base
   ------------------------------------------------------------ */
body {
    font-family: 'Vazirmatn', 'Poppins', Tahoma, sans-serif;
    background: var(--tehran-bg-light);
    color: var(--tehran-text);
    margin: 0;
    padding: 0;
    line-height: 1.8;
}

.main-content { min-height: 70vh; }

.tehran-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* ------------------------------------------------------------
   3) Main header
   ------------------------------------------------------------ */
.tehran-header {
    background: var(--tehran-secondary);
    border-bottom: 4px solid var(--tehran-primary);
    padding: .5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
}

.tehran-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    gap: 1rem;
}

.tehran-logo video {
    max-height: 55px;
    display: block;
}

.tehran-brand-title {
    color: #f5c47a;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.tehran-brand-sub {
    color: #bcc8d6;
    font-size: .8rem;
    margin: 0;
}

.tehran-brand-welcome {
    color: #ffd700;
    font-size: .85rem;
}

.tehran-nav ul {
    display: flex;
    list-style: none;
    gap: .5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.tehran-nav ul li a {
    color: #e2e8f0;
    text-decoration: none;
    padding: .4rem .8rem;
    border-radius: 30px;
    font-size: .9rem;
    transition: var(--tehran-transition);
}

.tehran-nav ul li a:hover,
.tehran-nav ul li a.active {
    background: var(--tehran-primary);
    color: #fff;
}

.tehran-nav ul li a:focus-visible {
    outline: 2px solid var(--tehran-primary);
    outline-offset: 2px;
}

/* ------------------------------------------------------------
   4) Header dashboard toggle
   ------------------------------------------------------------ */
.tehran-tools .dashboard-toggle {
    background: rgba(232, 138, 62, .1);
    border: 1px solid rgba(232, 138, 62, .3);
    border-radius: 30px;
    padding: .4rem 1rem;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: var(--tehran-transition);
    font-family: inherit;
}

.tehran-tools .dashboard-toggle:hover,
.tehran-tools .dashboard-toggle:focus-visible {
    background: rgba(232, 138, 62, .2);
    outline: none;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
}

/* ------------------------------------------------------------
   5) Mini sticky header
   ------------------------------------------------------------ */
.tehran-mini-header {
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;
    background: var(--tehran-secondary);
    border-bottom: 3px solid var(--tehran-primary);
    z-index: 999;
    transition: top .3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.tehran-mini-header.show { top: 0; }

.tehran-mini-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: .5rem 1rem;
    gap: 1rem;
}

.tehran-mini-logo video {
    max-height: 40px;
    display: block;
}

.tehran-mini-nav ul {
    display: flex;
    list-style: none;
    gap: .5rem;
    margin: 0;
    padding: 0;
}

.tehran-mini-nav ul li a {
    color: #e2e8f0;
    text-decoration: none;
    padding: .3rem .8rem;
    border-radius: 30px;
    font-size: .85rem;
    transition: var(--tehran-transition);
}

.tehran-mini-nav ul li a:hover,
.tehran-mini-nav ul li a.active {
    background: var(--tehran-primary);
    color: #fff;
}

.tehran-mini-header .dashboard-toggle {
    background: rgba(232, 138, 62, .1);
    border: 1px solid rgba(232, 138, 62, .3);
    border-radius: 30px;
    padding: .3rem .8rem;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
}

/* ------------------------------------------------------------
   6) Dashboard panel
   ------------------------------------------------------------ */
.dashboard-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}

.dashboard-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.dashboard-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    max-width: 90vw;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 1002;
    transition: right .3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, .2);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-panel.active { right: 0; }

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--tehran-border);
}

.dashboard-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    transition: color .25s ease, transform .25s ease;
}

.dashboard-close:hover,
.dashboard-close:focus-visible {
    color: var(--tehran-primary);
    transform: scale(1.1);
    outline: none;
}

.dashboard-content { padding: 1rem; }

.dashboard-content input {
    display: block;
    width: 100%;
    margin-bottom: .8rem;
    padding: .6rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: .9rem;
    font-family: inherit;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.dashboard-content input:focus {
    border-color: var(--tehran-primary);
    box-shadow: 0 0 0 3px rgba(232, 138, 62, .15);
    outline: none;
}

.dashboard-content button.btn-primary {
    width: 100%;
    padding: .7rem;
    background: var(--tehran-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: background .25s ease;
}

.dashboard-content button.btn-primary:hover {
    background: var(--tehran-primary-dark);
}

/* ------------------------------------------------------------
   7) Dark mode toggle (floating)
   ------------------------------------------------------------ */
.floating-dark-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--tehran-secondary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    transition: var(--tehran-transition);
    line-height: 1;
    padding: 0;
}

.floating-dark-toggle:hover,
.floating-dark-toggle:focus-visible {
    transform: scale(1.1);
    background: var(--tehran-primary);
    outline: none;
}

/* ------------------------------------------------------------
   8) Hero section
   ------------------------------------------------------------ */
.tehran-hero {
    background: linear-gradient(135deg, #ffffff 0%, #fef5e7 100%);
    border-radius: var(--tehran-radius);
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: var(--tehran-shadow);
    text-align: center;
}

.tehran-hero h1 {
    color: var(--tehran-secondary);
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.tehran-hero p {
    font-size: 1.1rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.service-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.service-card {
    background: #fff;
    border: 2px solid var(--tehran-primary);
    border-radius: 14px;
    padding: 1.2rem 2rem;
    text-decoration: none;
    color: var(--tehran-secondary);
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: var(--tehran-transition);
}

.service-card:hover,
.service-card:focus-visible {
    background: var(--tehran-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(232, 138, 62, .3);
    outline: none;
}

/* ------------------------------------------------------------
   9) CTA block
   ------------------------------------------------------------ */
.cta-block {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.btn-reserve {
    background: var(--tehran-primary);
    color: #fff;
    padding: .8rem 1.8rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: bold;
    transition: var(--tehran-transition);
    display: inline-block;
}

.btn-reserve:hover,
.btn-reserve:focus-visible {
    background: var(--tehran-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(232, 138, 62, .4);
    outline: none;
    color: #fff;
}

.contact-info span {
    margin: 0 .5rem;
    color: #555;
}

.contact-info a {
    color: var(--tehran-secondary);
    text-decoration: none;
    font-weight: bold;
    transition: color .2s ease;
}

.contact-info a:hover {
    color: var(--tehran-primary);
}

/* ------------------------------------------------------------
   10) Branches list
   ------------------------------------------------------------ */
.branches-list-section {
    background: #fff;
    border-radius: var(--tehran-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--tehran-shadow);
    text-align: right;
}

.branches-list-section h3 {
    color: var(--tehran-secondary);
    border-bottom: 2px solid var(--tehran-primary);
    padding-bottom: .5rem;
    margin-bottom: 1rem;
}

.branches-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.branches-list li {
    padding: .8rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.branches-list li:last-child { border-bottom: none; }

.map-btn {
    background: var(--tehran-secondary);
    color: #fff;
    padding: .3rem 1rem;
    border-radius: 30px;
    text-decoration: none;
    font-size: .9rem;
    transition: var(--tehran-transition);
    margin-right: auto;
    white-space: nowrap;
}

.map-btn:hover,
.map-btn:focus-visible {
    background: var(--tehran-primary);
    outline: none;
    color: #fff;
}

/* ------------------------------------------------------------
   11) About block
   ------------------------------------------------------------ */
.tehran-about {
    background: #fff;
    border-radius: var(--tehran-radius);
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--tehran-shadow);
}

.tehran-about h2 {
    color: var(--tehran-secondary);
}

.tehran-about ul {
    list-style: none;
    padding: 0;
}

.tehran-about li {
    margin: .6rem 0;
    font-size: 1rem;
}

/* ------------------------------------------------------------
   12) Posts
   ------------------------------------------------------------ */
.latest-posts-section,
.service-posts-section { margin: 2rem 0; }

.latest-posts-section h2,
.service-posts-section h2 {
    color: var(--tehran-secondary);
    border-bottom: 2px solid var(--tehran-primary);
    padding-bottom: .5rem;
}

.service-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-posts-column h3 {
    color: var(--tehran-secondary);
    margin-bottom: 1rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.service-post-card {
    background: #fff;
    border-radius: var(--tehran-radius);
    overflow: hidden;
    box-shadow: var(--tehran-shadow);
    transition: var(--tehran-transition);
}

.service-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.post-info { padding: 1rem; }

.post-title {
    margin: 0 0 .5rem;
    font-size: 1.1rem;
    color: var(--tehran-secondary);
    line-height: 1.4;
}

.post-date {
    color: var(--tehran-muted);
    font-size: .8rem;
}

.post-excerpt {
    color: #666;
    font-size: .9rem;
    margin: .5rem 0 0;
    line-height: 1.6;
}

.no-posts {
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    color: var(--tehran-muted);
}

/* ------------------------------------------------------------
   13) Service page
   ------------------------------------------------------------ */
.service-page {
    background: #fff;
    border-radius: var(--tehran-radius);
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: var(--tehran-shadow);
}

.service-page h1 { color: var(--tehran-secondary); }

.service-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .5rem;
}

.service-list li {
    background: #f8f9fa;
    border-radius: 8px;
    padding: .6rem 1rem;
}

/* ------------------------------------------------------------
   14) Testimonials
   ------------------------------------------------------------ */
.testimonials-section {
    background: #fff;
    border-radius: var(--tehran-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--tehran-shadow);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.testimonial-card {
    background: #fef9f0;
    border-radius: 12px;
    padding: 1rem;
    border-right: 4px solid var(--tehran-primary);
}

.testimonial-text {
    font-style: italic;
    color: #555;
    margin: 0 0 .5rem;
    line-height: 1.7;
}

.testimonial-author {
    font-size: .9rem;
    color: var(--tehran-secondary);
    font-weight: bold;
}

/* ------------------------------------------------------------
   15) FAQ
   ------------------------------------------------------------ */
.faq-section {
    background: #fff;
    border-radius: var(--tehran-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--tehran-shadow);
}

.faq-list { margin-top: 1rem; }

.faq-item {
    border-bottom: 1px solid #f0f0f0;
    padding: .8rem 0;
}

.faq-item:last-child { border-bottom: none; }

.faq-question {
    color: var(--tehran-secondary);
    cursor: pointer;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.faq-answer {
    color: #666;
    padding-top: .5rem;
    line-height: 1.7;
}

/* ------------------------------------------------------------
   16) Error page
   ------------------------------------------------------------ */
.error-404 {
    background: #fff;
    border-radius: var(--tehran-radius);
    padding: 3rem;
    text-align: center;
    margin: 2rem auto;
    max-width: 600px;
    box-shadow: var(--tehran-shadow);
}

.error-404 h1 { color: #e74c3c; }

/* ------------------------------------------------------------
   17) Single post
   ------------------------------------------------------------ */
.single-post {
    background: #fff;
    border-radius: var(--tehran-radius);
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: var(--tehran-shadow);
}

.single-post h1 {
    color: var(--tehran-secondary);
    line-height: 1.4;
}

.post-meta {
    color: var(--tehran-muted);
    margin-bottom: 1rem;
}

.post-content {
    line-height: 2;
    color: #333;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}

.post-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tehran-border);
}

.back-link {
    display: inline-block;
    background: var(--tehran-secondary);
    color: #fff;
    padding: .5rem 1.2rem;
    border-radius: 30px;
    text-decoration: none;
    transition: var(--tehran-transition);
}

.back-link:hover,
.back-link:focus-visible {
    background: var(--tehran-primary);
    outline: none;
    color: #fff;
}

/* ------------------------------------------------------------
   18) Footer
   ------------------------------------------------------------ */
.tehran-site-footer {
    background: #1e293b;
    border-top: 4px solid var(--tehran-primary);
    padding: 2rem 1rem;
    color: #cbd5e1;
    margin-top: 3rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column h4 {
    color: #f5c47a;
    border-bottom: 2px solid rgba(232, 138, 62, .2);
    padding-bottom: .5rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li { margin: .5rem 0; }

.footer-column ul li a {
    color: #bcc8d6;
    text-decoration: none;
    transition: color .2s;
}

.footer-column ul li a:hover,
.footer-column ul li a:focus-visible {
    color: #f5c47a;
    outline: none;
}

.footer-contact-list li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem;
}

.contact-icon { margin-left: .3rem; }

.contact-divider {
    color: #475569;
    margin: 0 .2rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .05);
    padding-top: 1rem;
    margin-top: 2rem;
    color: #94a3b8;
    font-size: .9rem;
}

/* ------------------------------------------------------------
   19) Floating icons
   ------------------------------------------------------------ */
.floating-icons {
    position: fixed;
    left: 20px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
    transition: transform .2s;
    background: rgba(255, 255, 255, .95);
}

.icon-btn:hover,
.icon-btn:focus-visible {
    transform: scale(1.1);
    outline: none;
}

.icon-btn img {
    width: 20px;
    height: 20px;
    display: block;
}

/* ------------------------------------------------------------
   20) Reading progress
   ------------------------------------------------------------ */
#reading-progress-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #f0f0f0;
    z-index: 1003;
    pointer-events: none;
}

#reading-progress {
    height: 100%;
    width: 0;
    background: var(--tehran-primary);
    transition: width .1s linear;
}

/* ------------------------------------------------------------
   21) Responsive
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .tehran-header-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .tehran-nav ul { justify-content: center; }

    .tehran-tools {
        display: flex;
        justify-content: center;
    }

    .service-links {
        flex-direction: column;
        align-items: center;
    }

    .cta-block {
        flex-direction: column;
        gap: .5rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-contact-list li { justify-content: center; }

    .floating-icons {
        left: 10px;
        bottom: 70px;
    }

    .service-posts-grid {
        grid-template-columns: 1fr;
    }

    .tehran-hero h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .dashboard-panel {
        width: 280px;
        right: -300px;
    }

    .tehran-brand-title { font-size: 1.1rem; }

    .service-card {
        padding: 1rem 1.5rem;
        font-size: .95rem;
    }

    .floating-icons { bottom: 60px; }
}

/* ------------------------------------------------------------
   22) Reduced motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .service-card:hover,
    .btn-reserve:hover,
    .service-post-card:hover,
    .icon-btn:hover,
    .floating-dark-toggle:hover {
        transform: none;
    }
}