/* ============================================
   EnerQia - Main Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Raleway:wght@300;400;500;600;700&display=swap');

/* --- Reset & Base --- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 140px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-normal);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
    color: var(--color-primary-dark);
}

ul, ol {
    list-style: none;
}

/* --- Typography --- */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--weight-normal);
    line-height: var(--leading-tight);
    color: var(--color-text);
}

h1 {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-xl);
}

h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

h4 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-md);
}

p {
    margin-bottom: var(--space-md);
}

/* --- Layout --- */

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

.container--narrow {
    max-width: var(--max-width-narrow);
}

.container--text {
    max-width: var(--max-width-text);
}

.section {
    padding: var(--space-4xl) 0;
}

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

.section--warm {
    background-color: var(--color-bg-warm);
}

/* --- Header / Navigation --- */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border-light);
    transition: box-shadow var(--transition-normal);
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    margin: 0 auto;
    padding: var(--space-md) var(--space-xl);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: var(--space-xl);
}

.logo img {
    height: 120px;
    width: auto;
    max-width: none;
    display: inline-block;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    color: var(--color-text);
    letter-spacing: 0.05em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.main-nav a {
    display: block;
    padding: var(--space-sm) var(--space-sm);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-primary);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--transition-fast);
    z-index: var(--z-dropdown);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
}

.nav-contact {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-left: var(--space-md);
    padding-left: var(--space-md);
    border-left: 1px solid var(--color-border-light);
    flex-shrink: 0;
}

.nav-contact a {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    white-space: nowrap;
}

.nav-contact a:hover {
    color: var(--color-primary);
}

.nav-mobile-contact {
    display: none;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    transition: all var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */

.hero {
    position: relative;
    height: 500px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    background-color: var(--color-bg-section);
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-white);
    width: 100%;
    padding: var(--space-xl) var(--space-2xl);
    background: rgba(180, 180, 180, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.hero-content h1 {
    color: var(--color-white);
    font-size: var(--text-3xl);
    margin-bottom: var(--space-xs);
    text-shadow: none;
}

/* --- Buttons --- */

.btn {
    display: inline-block;
    padding: var(--space-md) var(--space-2xl);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    letter-spacing: 0.05em;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

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

.hero-btn {
    background: #D4837A;
    color: var(--color-white);
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
}

.hero-btn:hover {
    background: #C0706A;
    color: var(--color-white);
}

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

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

.btn--dark {
    background: var(--color-text);
    color: var(--color-white);
}

.btn--dark:hover {
    background: #444;
    color: var(--color-white);
}

.btn--lg {
    padding: var(--space-lg) var(--space-3xl);
    font-size: var(--text-lg);
}

/* --- Cards --- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-2xl);
}

.card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: var(--space-xl);
}

.card-body h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

.card-body p {
    color: var(--color-text-light);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

/* --- Treatment Section (alternating image/text) --- */

.treatment-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    padding: var(--space-3xl) 0;
    border-bottom: 1px solid var(--color-border-light);
}

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

.treatment-item:nth-child(even) .treatment-image {
    order: 2;
}

.treatment-image {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.treatment-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.treatment-text h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.treatment-text p {
    color: var(--color-text-light);
    line-height: var(--leading-relaxed);
}

/* --- Quote Carousel --- */

.quotes-section {
    padding: var(--space-4xl) 0;
    text-align: center;
    background: var(--color-white);
}

.quote-carousel {
    position: relative;
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 0 var(--space-3xl);
}

.quote-icon {
    font-size: var(--text-4xl);
    color: var(--color-text);
    margin-bottom: var(--space-xl);
    font-family: Georgia, serif;
}

.quote-slide {
    display: none;
}

.quote-slide.active {
    display: block;
}

.quote-text {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-style: italic;
    color: var(--color-text);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-lg);
}

.quote-author {
    font-size: var(--text-base);
    color: var(--color-text-light);
    letter-spacing: 0.1em;
}

.quote-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: var(--text-3xl);
    color: var(--color-text);
    cursor: pointer;
    padding: var(--space-md);
    transition: color var(--transition-fast);
}

.quote-nav:hover {
    color: var(--color-primary);
}

.quote-nav--prev {
    left: 0;
}

.quote-nav--next {
    right: 0;
}

.quote-dots {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
}

.quote-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-border);
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.quote-dot.active {
    background: var(--color-text);
}

/* --- Forms --- */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

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

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-muted);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--color-text-light);
}

.form-checkbox input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--color-primary);
}

.form-error {
    color: var(--color-error);
    font-size: var(--text-sm);
    margin-top: var(--space-xs);
}

.form-success {
    background: #E8F5E9;
    color: var(--color-success);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
    text-align: center;
}

/* --- Contact Section --- */

.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    padding: var(--space-4xl) 0;
    background: var(--color-bg-section);
}

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

.contact-info h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-2xl);
}

.contact-info p {
    color: var(--color-text-light);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-sm);
}

.contact-info a {
    color: var(--color-text-light);
    text-decoration: underline;
}

.contact-info .contact-label {
    font-weight: var(--weight-semibold);
    color: var(--color-text);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

/* --- Indications / Applications List --- */

.indications-section {
    position: relative;
}

.indications-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
}

.indication-category {
    margin-bottom: var(--space-2xl);
}

.indication-category h3 {
    font-size: var(--text-xl);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    text-align: center;
    font-weight: var(--weight-semibold);
}

.indication-list {
    text-align: center;
    color: var(--color-text-light);
    line-height: var(--leading-relaxed);
}

.indication-list span {
    display: block;
    padding: var(--space-xs) 0;
}

/* --- Image Carousel --- */

.image-carousel {
    position: relative;
    width: 100%;
    height: 525px;
    overflow: hidden;
}

.image-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.image-carousel-slide.active {
    opacity: 1;
}

/* --- Blog --- */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-2xl);
}

.blog-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-body {
    padding: var(--space-xl);
}

.blog-card-date {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.blog-card-body h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
}

.blog-card-body h3 a {
    color: var(--color-text);
}

.blog-card-body h3 a:hover {
    color: var(--color-primary);
}

.blog-card-excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    line-height: var(--leading-relaxed);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-3xl);
}

.pagination a, .pagination span {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    color: var(--color-text);
}

.pagination a:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.pagination .current {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* --- Footer --- */

.site-footer {
    background: var(--color-bg-footer);
    padding: var(--space-3xl) 0 var(--space-xl);
    text-align: center;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    color: var(--color-text);
    margin-bottom: var(--space-lg);
}

.footer-contact p {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-xs);
}

.footer-contact a {
    color: var(--color-text-light);
    text-decoration: underline;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-text);
    color: var(--color-white);
    border-radius: 50%;
    font-size: var(--text-lg);
    transition: background var(--transition-fast);
}

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

.footer-bottom {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.footer-bottom a {
    color: var(--color-text-muted);
    text-decoration: underline;
}

/* --- Page Header (for inner pages) --- */

.page-header {
    text-align: center;
    padding: var(--space-lg) 0 0;
}

.page-header h1 {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-sm);
}

.page-header p {
    max-width: var(--max-width-text);
    margin: 0 auto;
    color: var(--color-text-light);
    font-size: var(--text-lg);
}

/* --- Utility Classes --- */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Honeypot field - hidden from real users */
.ohnohoney {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}
