/*
Theme Name: Derma Studio
Theme URI: https://example.com/derma-studio
Author: Derma Studio Team
Description: A modern clinical WordPress theme for dermatology clinics. Clean, warm, and professional — built for skin health.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: derma-studio
Tags: one-column, custom-logo, custom-menu, featured-images, flexible-header, threaded-comments, translation-ready

Derma Studio is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
any later version.
*/

/*--------------------------------------------------------------
1. RESET & BASE
--------------------------------------------------------------*/
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-white: #faf9f7;
  --color-off-white: #f5f2ee;
  --color-sage: #b8c4b2;
  --color-sage-dark: #8f9e8a;
  --color-taupe: #8a7f76;
  --color-charcoal: #3a3632;
  --color-accent: #5b7b6a;
  --color-accent-hover: #4a6458;
  --color-border: #e5e0d8;
  --color-error: #c0392b;
  --color-success: #2e7d4f;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(58, 54, 50, 0.06);
  --max-width: 1200px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-charcoal);
  background: var(--color-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--color-accent-hover);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-charcoal);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

ul, ol { list-style: none; }

input, textarea, button, select {
  font: inherit;
  color: inherit;
}

/*--------------------------------------------------------------
2. SKIP LINK & ACCESSIBILITY
--------------------------------------------------------------*/
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

/*--------------------------------------------------------------
3. HEADER & NAVIGATION
--------------------------------------------------------------*/
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo {
  height: 44px;
  width: auto;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-charcoal);
}

.site-nav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-charcoal);
  padding: 0.25rem;
}

.site-nav__menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.site-nav__menu a {
  color: var(--color-charcoal);
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}

.site-nav__menu a:hover,
.site-nav__menu a:focus {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  border: none;
}

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

.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  color: #fff;
}

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

.btn--outline:hover {
  background: var(--color-accent);
  color: #fff;
}

/*--------------------------------------------------------------
4. HERO
--------------------------------------------------------------*/
.hero {
  background: linear-gradient(135deg, var(--color-off-white) 0%, var(--color-white) 100%);
  padding: clamp(4rem, 10vw, 7rem) 0;
  text-align: center;
}

.hero__tag {
  display: inline-block;
  background: var(--color-sage);
  color: var(--color-charcoal);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.hero__title {
  margin-bottom: 1rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--color-taupe);
  max-width: 580px;
  margin: 0 auto 2rem;
}

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

/*--------------------------------------------------------------
5. SECTIONS (Services, Team, Testimonials, CTA)
--------------------------------------------------------------*/
.section {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
}

.section--alt {
  background: var(--color-off-white);
}

.section__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section__header p {
  color: var(--color-taupe);
  margin-top: 0.75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.service-card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.service-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.service-card p {
  color: var(--color-taupe);
  font-size: 0.95rem;
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
  text-align: center;
}

.team-card img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--color-sage);
}

.team-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.team-card__role {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.testimonial {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.testimonial__stars {
  color: var(--color-sage-dark);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.testimonial blockquote {
  font-style: italic;
  color: var(--color-taupe);
  margin-bottom: 1rem;
}

.testimonial cite {
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
}

/* CTA */
.cta {
  text-align: center;
  border-radius: var(--radius);
  padding: clamp(2.5rem, 6vw, 4rem);
  background: var(--color-accent);
  color: #fff;
}

.cta h2 {
  color: #fff;
}

.cta p {
  margin-top: 0.75rem;
  opacity: 0.95;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

.cta .btn--primary {
  background: #fff;
  color: var(--color-accent);
}

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

/*--------------------------------------------------------------
6. CONTACT FORM
--------------------------------------------------------------*/
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(91, 123, 106, 0.12);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form__msg {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
}

.form__msg--success {
  background: #eaf4ec;
  color: var(--color-success);
  border: 1px solid #b7d9c2;
}

.form__msg--error {
  background: #fdecea;
  color: var(--color-error);
  border: 1px solid #f0c4bf;
}

/*--------------------------------------------------------------
7. FOOTER
--------------------------------------------------------------*/
.site-footer {
  background: var(--color-charcoal);
  color: var(--color-sage);
  padding: 3rem 0 1.5rem;
}

.site-footer a {
  color: var(--color-sage);
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-grid p,
.footer-grid li {
  font-size: 0.9rem;
  opacity: 0.85;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/*--------------------------------------------------------------
8. BLOG / SINGLE / ARCHIVE
--------------------------------------------------------------*/
.entry-header {
  margin-bottom: 1.5rem;
}

.entry-meta {
  font-size: 0.85rem;
  color: var(--color-taupe);
  margin-bottom: 0.75rem;
}

.blog-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-card h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

/*--------------------------------------------------------------
9. UTILITIES
--------------------------------------------------------------*/
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}

/*--------------------------------------------------------------
10. RESPONSIVE
--------------------------------------------------------------*/
@media (max-width: 640px) {
  .site-nav__toggle {
    display: block;
  }

  .site-nav__menu {
    display: none;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
  }

  .site-nav__menu.is-open {
    display: flex;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }
}
