/*
Theme Name: Riau Eye Center
Theme URI: https://riaueyecenter.com
Author: Riau Eye Center
Author URI: https://riaueyecenter.com
Description: Theme resmi Riau Eye Center - Pusat Mata Terpercaya di Pekanbaru
Version: 3.16.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: riau-eye-center
Tags: medical, clinic, health, responsive
*/

/* ====== RESET & GLOBAL STYLES ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
  --primary-color: #800000;
  --primary-dark: #4d0303;
  --secondary-color: #b85c5c;
  --light-color: #fdf6f6;
  --dark-color: #2c2c2c;
  --success-color: #d4af37;
  --white: #ffffff;
  --shadow: 0 5px 15px rgba(128,0,0,0.25);
  --transition: all 0.3s ease;
  --gradient: linear-gradient(135deg, #800000, #b85c5c);
}

body,
body * {
  color: #000000;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3 {
    margin-bottom: 20px;
    color: #000000;
    font-weight: 600;
}

h1 { font-size: 3rem; }

h2 {
    font-size: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

h3 { font-size: 1.5rem; }

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

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

ul { list-style: none; }

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

section { padding: 80px 0; }

/* ====== BUTTONS ====== */
.btn-primary {
    display: inline-block;
    background: var(--gradient);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4d0000, #800000);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px #80000066;
}

.btn-secondary {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    font-size: 14px;
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
}

/* ====== HEADER ====== */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    flex-wrap: nowrap;
    gap: 8px;
}

.logo img {
    height: 60px;
    max-width: 200px;
    width: auto;
    object-fit: contain;
}

nav ul { display: flex; flex-wrap: wrap; }

nav ul li { margin-left: 22px; }

nav ul li a {
    color: #000000;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

nav ul li a:hover { color: #000000; }

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after { width: 100%; }

.cta-header {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.cta-header .btn-primary,
.cta-header .btn-secondary {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
}

/* ====== HERO SECTION ====== */
.hero {
  position: relative;
  background: url("assets/hero-bg1.jpeg") center center/cover no-repeat;
  min-height: 50vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: clamp(80px, 10vw, 120px) 20px clamp(50px, 6vw, 80px);
  margin-top: 70px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1;
}

.hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 90vw;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    margin-bottom: 10px;
    color: var(--white) !important;
    line-height: 1.2;
}

.hero h2 {
    font-size: clamp(1.2rem, 3.5vw, 2rem);
    margin-bottom: 20px;
    color: var(--white) !important;
}

.hero h2::after { display: none; }

.hero p {
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    margin-bottom: 30px;
    max-width: min(600px, 88vw);
    margin-left: auto;
    margin-right: auto;
    color: var(--white) !important;
}

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

/* ====== SERVICES SECTION ====== */
.services {
  background: linear-gradient(135deg, #b90202, #8f8a8a);
  padding: 50px 20px;
  color: #fff;
  text-align: center;
}

.services .section-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.section-logo { width: 40px; }

.services-wrapper {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  justify-content: flex-start;
  padding: 10px;
}

.service-card {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 20px;
  min-width: 220px;
  scroll-snap-align: start;
  flex-shrink: 0;
  text-align: center;
}

.service-card img { width: 70px; margin-bottom: 15px; }
.service-card h3 { font-size: 18px; margin-bottom: 10px; color: #fff; }
.service-card p { font-size: 14px; margin-bottom: 10px; color: #e9f4f4; }
.service-card a { color: #ffd5d5; font-weight: bold; text-decoration: none; }

/* ====== ABOUT SECTION ====== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p { margin-bottom: 20px; color: #000000 !important; }

.about-features { margin: 30px 0; }

.feature {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.feature i {
    color: var(--success-color);
    font-size: 24px;
    margin-right: 15px;
    margin-top: 5px;
}

.feature h3 { margin-bottom: 5px; font-size: 1.2rem; }
.feature p { margin: 0; color: #000000 !important; }

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ====== DOCTORS SECTION ====== */
.doctors { background: var(--light-color); }

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.doctor-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.doctor-card:hover { transform: translateY(-10px); }

.doctor-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.doctor-info { padding: 25px; text-align: center; }
.doctor-info h3 { margin-bottom: 5px; }
.doctor-info p { color: #000000 !important; margin-bottom: 15px; }

.doctor-info .social-links a {
    display: inline-block;
    width: 36px; height: 36px;
    background: var(--light-color);
    color: var(--primary-color);
    text-align: center;
    line-height: 36px;
    border-radius: 50%;
    margin: 0 5px;
    transition: var(--transition);
}

.doctor-info .social-links a:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ====== FACILITIES SECTION ====== */
.facilities-grid {
    display: flex;
    gap: 20px;
    overflow: hidden;
    padding: 10px 0;
    cursor: grab;
    user-select: none;
}

.facility-card {
    flex: 0 0 300px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.facility-card:hover { transform: translateY(-5px); }

.facility-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.facility-info { padding: 25px; }
.facility-info h3 { margin-bottom: 15px; }
.facility-info p { color: #000000 !important; }

/* ====== TESTIMONIALS SECTION ====== */
.testimonial-slider {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 0;
}

.testimonial-card {
  flex: 0 0 auto;
  min-width: 280px;
  max-width: 300px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  box-shadow: 0 6px 12px rgba(0,0,0,.08);
  padding: 14px;
  cursor: pointer;
  transition: transform .2s;
}

.testimonial-card:hover { transform: translateY(-3px); }

.testimonial-card img {
  border-radius: 12px;
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 10px;
}

/* ====== CONTACT SECTION ====== */
.contact { background: var(--light-color); }

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h2 { text-align: left; }
.contact-info h2::after { left: 0; transform: none; }
.contact-info p { margin-bottom: 30px; color: var(--secondary-color); }

.contact-item { display: flex; margin-bottom: 25px; }
.contact-item i { font-size: 24px; color: var(--primary-color); margin-right: 15px; margin-top: 5px; }
.contact-item h3 { margin-bottom: 5px; font-size: 1.2rem; }
.contact-item p { margin: 0; }

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-form h3 { margin-bottom: 30px; text-align: center; }

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea { resize: vertical; }

/* ====== SOCIAL LINKS ====== */
.contact-info .social-links a {
  display: inline-block;
  width: 45px; height: 45px;
  border-radius: 50%;
  text-align: center;
  line-height: 45px;
  font-size: 20px;
  color: #fff;
  margin-right: 10px;
  background: var(--primary-color);
  transition: var(--transition);
}

.contact-info .social-links a:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ====== FOOTER ====== */
footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 70px 0 20px;
}

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

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 50px; height: 2px;
    background: var(--primary-color);
}

.footer-logo img { height: 50px; margin-bottom: 20px; }
.footer-col p { margin-bottom: 20px; color: #ddd; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #ddd; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--primary-color); padding-left: 5px; }

.opening-hours li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #ddd;
}

.newsletter-form { display: flex; margin-top: 20px; }

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
}

.newsletter-form button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover { background: var(--primary-dark); }

.privacy-note { font-size: 12px; margin-top: 10px; color: #aaa; }

.footer-certificates {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    background: #a09999;
    border-radius: 10px;
}

.footer-certificates h3 { margin-bottom: 15px; font-size: 16px; font-weight: bold; color: #333; }
.footer-certificates img { max-height: 60px; margin: 8px; transition: transform 0.3s; }
.footer-certificates img:hover { transform: scale(1.1); }

footer, footer * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

.copyright a { color: #ddd; }
.copyright a:hover { color: var(--primary-color); }

/* ====== VIDEO PROFILE ====== */
.video-profile { text-align: center; padding: 60px 20px; background: #f9f9f9; }
.video-profile h2 { font-size: 2rem; margin-bottom: 20px; color: var(--dark-color); }

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* ====== FLOATING WHATSAPP ====== */
.whatsapp-float {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: calc(20px + env(safe-area-inset-right));
    width: 60px; height: 60px;
    z-index: 100;
}

.whatsapp-float img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 2px 2px 6px rgba(255,255,255,0.3);
    transition: transform 0.3s ease;
}

.whatsapp-float img:hover { transform: scale(1.1); }

/* ====== ARTICLES ====== */
.articles { padding: 60px 0; background: var(--light-color); }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.section-header h2 { font-size: 28px; color: var(--primary-color); }

.section-header .lihat-semua {
  font-size: 14px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.articles-grid, .facilities-grid {
  display: flex;
  gap: 20px;
  overflow: hidden;
  padding: 10px 0;
  cursor: grab;
  user-select: none;
}

.article-card, .facility-card {
  flex: 0 0 300px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.article-card:hover, .facility-card:hover { transform: translateY(-5px); }

.article-image img { width: 100%; height: 180px; object-fit: cover; }
.article-content { padding: 15px; }

.article-category {
  display: inline-block;
  font-size: 12px;
  font-weight: bold;
  color: var(--primary-dark);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.article-content h3 { font-size: 18px; margin-bottom: 10px; color: var(--primary-color); }
.article-content p { font-size: 14px; color: #555; margin-bottom: 6px; }

.articles .article-card .btn-readmore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 12px;
  margin-top: 10px;
  text-decoration: none;
  background: #800000;
  color: #fff;
  border: 2px solid transparent;
  transition: background .2s ease, transform .2s ease;
}

.articles .article-card .btn-readmore:hover { background: #600000; transform: translateY(-1px); }

.facilities .facility-card { position: relative; }
.facilities .facility-card a { position: relative; z-index: 1; }

.facilities .facility-card .btn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 10px;
  font-size: .95rem;
  background: #800000;
  color: #fff;
  border: 2px solid transparent;
  transition: background .2s ease, transform .2s ease;
}

.facilities .facility-card .btn-more:hover { background: #600000; transform: translateY(-1px); }
.facility-image-link { display: block; line-height: 0; border-radius: 12px; overflow: hidden; }
.facility-image-link img { width: 100%; height: auto; display: block; }

/* ====== NAV TOGGLE ====== */
.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 10px;
  line-height: 1;
  cursor: pointer;
}
.nav-toggle i { font-size: 22px; color: #000; }

/* ====== TYPOGRAPHY ADAPTIVE ====== */
html { font-size: 16px; }
h1 { font-size: clamp(1.6rem, 3.5vw + 1rem, 3rem); }
h2 { font-size: clamp(1.3rem, 2.5vw + 0.9rem, 2.2rem); }
h3 { font-size: clamp(1.05rem, 1.4vw + 0.8rem, 1.4rem); }
section { padding: clamp(48px, 6vw, 80px) 0; }

/* ====== SECTION LOGO ====== */
.section-logo {
  width: 70px;
  height: auto;
  vertical-align: middle;
  margin-right: 10px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .about-content, .contact-content { grid-template-columns: 1fr; }
    .about-image { order: -1; }
    header .container { gap: 12px; }
    .cta-header { display: none; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    nav { position: relative; width: 100%; }
    nav ul {
        position: absolute;
        top: calc(100% + 8px);
        right: 0; left: 0;
        width: 100%;
        display: none;
        flex-direction: column;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,.12);
        padding: 8px;
        z-index: 9999;
    }
    nav.active ul { display: flex; }
    nav ul li { margin: 0; }
    nav ul li a { padding: 12px 14px; border-radius: 8px; text-align: left; }
    nav ul li a:hover::after { width: 0; }

    .hero-buttons { flex-direction: column; }
    .hero .btn-primary, .hero .btn-secondary { width: 100%; justify-content: center; }

    .services-grid, .doctors-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
    .doctor-card img { height: 220px; }

    .testimonial-slider { gap: 16px; padding: 10px 0; }
    .testimonial-card { min-width: 88%; padding: 20px; }

    .footer-grid { gap: 20px; text-align: left; }

    .footer-certificates { grid-template-columns: 1fr; gap: 20px; padding: 20px 16px; }
}

@media (max-width: 576px) {
    .container { padding: 0 16px; }
    .contact-form { padding: 22px 16px; }
    .form-group input, .form-group select, .form-group textarea { font-size: 16px; padding: 12px 14px; }
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; padding: 12px 16px; font-size: 15px; }

    .articles-grid, .facilities-grid {
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 8px 4px;
    }
    .article-card, .facility-card { flex: 0 0 82%; scroll-snap-align: start; }

    .footer-certificates { grid-template-columns: 1fr; gap: 20px; padding: 20px 14px; margin-top: 24px; }
    .footer-certificates img { max-height: 44px; }
    .footer-certificates .cert-col:last-child:empty { display: none; }

    .whatsapp-float {
        bottom: calc(16px + env(safe-area-inset-bottom));
        right: 16px;
        width: 54px; height: 54px;
    }
}

/* ====== FORM STATUS ====== */
.form-status { color: var(--primary-color); font-weight: 600; margin-bottom: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
