/* ================================
   Project007 - Medical/Clinic/Dental Website
   Design System & Styles
   ================================ */

/* ================================
   CSS Variables
   ================================ */
:root {
    /* Colors */
    --color-primary: #0ea5e9;
    --color-primary-dark: #0369a1;
    --color-primary-light: #7dd3fc;
    --color-secondary: #10b981;
    --color-secondary-dark: #059669;
    --color-accent: #f472b6;
    --color-accent-dark: #ec4899;

    --color-white: #ffffff;
    --color-light: #f0f9ff;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-dark: #0f172a;

    /* Status Colors */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;

    /* Typography */
    --font-main: 'Noto Sans JP', sans-serif;
    --font-en: 'Poppins', sans-serif;

    /* Spacing */
    --space-xs: 5px;
    --space-sm: 10px;
    --space-md: 20px;
    --space-lg: 40px;
    --space-xl: 60px;
    --space-xxl: 100px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition: all 0.3s ease;

    /* Layout */
    --container-max: 1200px;
    --header-height: 80px;
}

/* ================================
   Reset & Base
   ================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-gray-700);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
}

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

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

ul,
ol {
    list-style: none;
}

/* ================================
   Layout
   ================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

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

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

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

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

/* ================================
   Typography
   ================================ */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-subtitle {
    font-family: var(--font-en);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gray-800);
    margin-bottom: 15px;
    line-height: 1.4;
}

.section-lead {
    font-size: 1rem;
    color: var(--color-gray-600);
    max-width: 700px;
    margin: 0 auto;
}

/* ================================
   Buttons
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

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

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

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

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

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

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

.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-white {
    background: var(--color-white);
    color: var(--color-primary);
}

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

.btn-lg {
    padding: 18px 40px;
    font-size: 1rem;
}

/* ================================
   Header
   ================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.3rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-tel {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-gray-700);
}

.header-tel-icon {
    width: 40px;
    height: 40px;
    background: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
}

.header-tel-number {
    font-family: var(--font-en);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-secondary);
    line-height: 1.2;
}

.header-tel-note {
    font-size: 0.75rem;
    color: var(--color-gray-500);
    line-height: 1.2;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-gray-700);
    position: relative;
}

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

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

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--color-gray-700);
    cursor: pointer;
}

/* ================================
   Hero Section
   ================================ */
.hero {
    height: 600px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.9), rgba(16, 185, 129, 0.8)),
        url('https://images.unsplash.com/photo-1631217868264-e5b90bb7e133?w=2000&q=85') center/cover;
    display: flex;
    align-items: center;
    margin-top: var(--header-height);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--color-white), transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--color-white);
    max-width: 650px;
}

.hero-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-text {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 35px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ================================
   Notice Bar
   ================================ */
.notice-bar {
    background: var(--color-warning);
    color: var(--color-white);
    padding: 12px 0;
    text-align: center;
    font-weight: 500;
}

.notice-bar i {
    margin-right: 10px;
}

/* ================================
   Info Cards
   ================================ */
.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.info-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: var(--transition);
}

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

.info-card-icon {
    width: 70px;
    height: 70px;
    background: var(--color-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--color-primary);
}

.info-card h3 {
    font-size: 1.1rem;
    color: var(--color-gray-800);
    margin-bottom: 10px;
}

.info-card p {
    font-size: 0.9rem;
    color: var(--color-gray-600);
}

/* ================================
   Service Cards
   ================================ */
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.service-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.service-card-img {
    height: 180px;
    overflow: hidden;
}

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

.service-card:hover .service-card-img img {
    transform: scale(1.05);
}

.service-card-content {
    padding: 25px;
}

.service-card-title {
    font-size: 1.1rem;
    color: var(--color-gray-800);
    margin-bottom: 10px;
}

.service-card-text {
    font-size: 0.9rem;
    color: var(--color-gray-600);
    margin-bottom: 15px;
}

.service-card-link {
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.service-card-link:hover {
    gap: 10px;
}

/* ================================
   Features
   ================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
    color: var(--color-white);
}

.feature-title {
    font-size: 1.2rem;
    color: var(--color-gray-800);
    margin-bottom: 15px;
}

.feature-text {
    font-size: 0.95rem;
    color: var(--color-gray-600);
}

/* ================================
   Doctor Card
   ================================ */
.doctor-section {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    align-items: center;
}

.doctor-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.doctor-img img {
    width: 100%;
    height: auto;
}

.doctor-info h3 {
    font-size: 0.9rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.doctor-name {
    font-size: 1.8rem;
    color: var(--color-gray-800);
    margin-bottom: 20px;
}

.doctor-name span {
    font-size: 1rem;
    margin-left: 10px;
    color: var(--color-gray-500);
}

.doctor-message {
    font-size: 1rem;
    line-height: 2;
    color: var(--color-gray-600);
    margin-bottom: 25px;
}

.doctor-credentials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.doctor-credentials span {
    background: var(--color-light);
    color: var(--color-primary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ================================
   Schedule Table
   ================================ */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.schedule-table th,
.schedule-table td {
    padding: 18px 15px;
    text-align: center;
    border-bottom: 1px solid var(--color-gray-200);
}

.schedule-table th {
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.9rem;
}

.schedule-table th.sat {
    background: var(--color-primary-dark);
}

.schedule-table th.sun {
    background: var(--color-accent);
}

.schedule-table td {
    font-size: 1.1rem;
}

.schedule-table .open {
    color: var(--color-secondary);
}

.schedule-table .closed {
    color: var(--color-gray-400);
}

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

/* ================================
   Access Section
   ================================ */
.access-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.access-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.access-map iframe {
    width: 100%;
    height: 400px;
    border: none;
}

.access-info h3 {
    font-size: 1.3rem;
    color: var(--color-gray-800);
    margin-bottom: 20px;
}

.access-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.access-item-icon {
    width: 45px;
    height: 45px;
    background: var(--color-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.access-item-content h4 {
    font-size: 0.9rem;
    color: var(--color-gray-500);
    margin-bottom: 5px;
}

.access-item-content p {
    font-size: 1rem;
    color: var(--color-gray-700);
}

/* ================================
   News Section
   ================================ */
.news-list {
    max-width: 900px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-gray-200);
    transition: var(--transition);
}

.news-item:hover {
    padding-left: 10px;
}

.news-date {
    font-family: var(--font-en);
    font-size: 0.9rem;
    color: var(--color-gray-500);
    min-width: 100px;
}

.news-tag {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.news-title {
    flex: 1;
    font-size: 0.95rem;
    color: var(--color-gray-700);
}

/* ================================
   CTA Section
   ================================ */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    padding: var(--space-xxl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-title {
    font-size: 2rem;
    color: var(--color-white);
    margin-bottom: 15px;
}

.cta-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-tel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    color: var(--color-white);
}

.cta-tel-number {
    font-family: var(--font-en);
    font-size: 2rem;
    font-weight: 700;
}

/* ================================
   Footer
   ================================ */
.footer {
    background: var(--color-gray-800);
    color: var(--color-white);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    display: block;
    margin-bottom: 20px;
}

.footer-info p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--color-white);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links ul li a:hover {
    color: var(--color-primary-light);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ================================
   Page Hero
   ================================ */
.page-hero {
    height: 300px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--header-height);
    text-align: center;
    color: var(--color-white);
}

.page-hero-content h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.page-hero-content p {
    font-family: var(--font-en);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    opacity: 0.8;
}

/* ================================
   Forms
   ================================ */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-gray-700);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: var(--font-main);
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    transition: var(--transition);
    background: var(--color-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-control::placeholder {
    color: var(--color-gray-400);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.form-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.form-check label {
    font-weight: 400;
    cursor: pointer;
}

/* ================================
   Sticky Footer (Mobile)
   ================================ */
.sticky-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 10px;
}

.sticky-footer-inner {
    display: flex;
    gap: 10px;
}

.sticky-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--color-gray-100);
    color: var(--color-gray-700);
}

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

.sticky-btn.tel {
    background: var(--color-secondary);
    color: var(--color-white);
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 1100px) {

    /* Hide header right completely on mobile as we use the mobile menu */
    .header-right {
        display: none;
    }

    /* Take nav out of flex flow so it doesn't affect spacing */
    nav {
        position: absolute;
        width: 0;
        height: 0;
    }

    .menu-toggle {
        display: block;
        /* Move icon to the absolute right edge, counteracting container padding */
        margin-right: -20px;
        /* Ensure it's big enough to tap but flush right */
        padding: 10px 20px 10px 10px;
    }

    .nav-list {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 280px;
        height: calc(100vh - var(--header-height));
        background: var(--color-white);
        flex-direction: column;
        padding: 40px 20px;
        gap: 25px;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }


    .nav-list.active {
        right: 0;
    }

    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .header-tel {
        display: none;
    }

    /* Grid adjustments */
    .info-cards,
    .service-grid,
    .features-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .doctor-section,
    .access-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero {
        height: auto;
        min-height: 500px;
        padding: 80px 20px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .sticky-footer {
        display: block;
    }

    body {
        padding-bottom: 85px;
    }
}

/* Specific Grid Styles (Moved from inline) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

@media (max-width: 768px) {
    .info-cards {
        margin-top: -40px;
        grid-template-columns: 1fr;
    }

    .service-grid,
    .features-grid,
    .access-grid {
        grid-template-columns: 1fr;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }

    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .page-hero {
        height: 250px;
    }

    .page-hero-content h1 {
        font-size: 1.8rem;
    }

    form {
        padding: 30px 20px !important;
    }

    /* Mobile adjustments for specific grids */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .staff-grid,
    .doctor-section {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .doctor-img {
        max-width: 100%;
        margin: 0 auto;
    }
}