/* --- Aesthetic Foundation & Typography --- */
:root {
    --primary-color: #014f40; /* Dark Teal/Forest Green */
    --secondary-color: #0077b6; /* Professional Blue */
    --accent-color: #ffd600; /* Gold/Yellow for contrast */
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --text-dark: #333333;
}

* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0;
}

/* Importing a modern aesthetic font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Playfair+Display:wght@700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    min-height: 100vh;
}

h1, h2, h3 {
    color: var(--primary-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* --- Header & Navigation --- */
header { 
    background-color: var(--primary-color);
    background-image: url("images/fmc-dental-clinic-background-1 (1).png");
    background-size: cover; 
    background-position: 1px; /* Ensures the image is correctly positioned */
    height: 500px;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

nav {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for readability */
    padding: 5px 0;
    z-index: 100;
    position: sticky;
    top: 0;
}

nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav li {
    margin: 0 15px;
    height: auto;
    display: flex;
    align-items: center;
}

nav a {
    color: var(--white);
    text-transform: uppercase;
    font-weight: 500;
    font-size: 15px;
    padding: 5px 0;
}

nav a:hover {
    color: var(--accent-color);
}

.logo a {
    background-image: url("images/loggo.png");
    background-size: contain;
    background-repeat: no-repeat;
    display: block;
    height: 100px;
    width: 200px;
    text-indent: -9999px;
    margin: 0 40px;
    background-position: 100px;
}

.nav-btn {
    background-color: var(--accent-color);
    color: var(--primary-color) !important;
    padding: 8px 18px;
    border-radius: 5px;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background-color: var(--white);
    color: var(--primary-color) !important;
}

/* Active Button Style (For Appointment Page) */
.nav-btn-active {
    background-color: var(--secondary-color) !important;
    color: var(--white) !important;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 700;
    transition: background 0.3s ease;
}
.nav-btn-active:hover {
    background-color: #0096c7 !important;
    color: var(--white) !important;
}


/* --- General Buttons & Hero Section --- */
.hero {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(to right, #e0f7fa, #ffffff);
}

.hero h1 {
  font-size: 44px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.hero p {
  font-size: 20px;
  color: #555;
  margin-bottom: 30px;
  font-weight: 300;
}

.btn {
  background-color: var(--secondary-color);
  color: white;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: background 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

.btn:hover {
  background-color: #0096c7;
  transform: translateY(-2px);
}


/* --- Section: Intro (Index Page) --- */
.intro {
    padding: 60px 20px;
    background-color: var(--light-bg);
    display: flex;
    justify-content: center;
}

.intro-box {
    background: var(--white);
    border-left: 8px solid var(--secondary-color);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    border-radius: 12px;
    text-align: left;
}

.intro-box h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 32px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.intro-box p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.intro-btn {
    margin-top: 20px;
}


/* --- Section: Services (Card Grid on Index) --- */
.services {
  text-align: center;
  padding: 80px 20px;
  background: var(--white);
}

.services h2 {
  color: var(--primary-color);
  font-size: 36px;
  margin-bottom: 10px;
}

.service-intro {
  max-width: 800px;
  margin: 0 auto 50px auto;
  font-size: 18px;
  color: #666;
}

.card-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
}

.card {
  background: var(--light-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  width: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none; 
  color: inherit;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-grow: 1;
}

.card-content h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin: 0;
}

.card-content .arrow {
  font-size: 24px;
  background: var(--accent-color);
  padding: 5px 10px;
  border-radius: 50%;
  font-weight: bold;
  color: var(--primary-color);
  line-height: 1;
}

/* --- Services Page Detail Layout --- */
.services-page-main {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.services-page-main h1 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 40px;
    color: var(--secondary-color);
}

.service-detail {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    padding: 30px;
    border-radius: 10px;
    background-color: var(--white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.service-reverse {
    flex-direction: row-reverse;
}

.service-image {
    width: 40%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.service-text {
    width: 60%;
    padding: 0 40px;
}
.service-reverse .service-text {
    padding: 0 40px 0 0;
}
.service-text h2 {
    font-size: 30px;
    margin-bottom: 15px;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 5px;
}
.service-text p {
    font-size: 16px;
    line-height: 1.7;
}

/* --- About Us Page --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.about-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}
.mission-vision {
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
}
.mission-vision h3 {
    color: var(--secondary-color);
    margin-top: 20px;
    font-size: 24px;
}
.team-section {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #ddd;
}
.team-card {
    display: inline-block;
    width: 250px;
    margin: 20px;
    text-align: center;
}
.team-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--accent-color);
}
.team-card h4 {
    margin-top: 15px;
    color: var(--primary-color);
}


/* --- Contact Page --- */
.contact-page-main {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.contact-details-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    text-align: left;
    margin-top: 40px;
}
.info-box {
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
}
.info-box h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}
.map-container iframe {
    width: 100%;
    height: 350px;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.social-icons a {
    margin-right: 15px;
    font-size: 24px;
}

/* --- Appointment Page (Form) --- */
.appointment-container {
    padding: 80px 20px;
    background-color: #f0f8ff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
}

.appointment-form-card {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.appointment-form-card h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 28px;
    font-family: 'Playfair Display', serif; 
}

.form-subtext {
    color: #555;
    margin-bottom: 30px;
    font-size: 16px;
}

.appointment-form {
    display: grid;
    gap: 20px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-size: 14px;
}

.appointment-form input,
.appointment-form select,
.appointment-form textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.appointment-form input:focus,
.appointment-form select:focus,
.appointment-form textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(0, 119, 182, 0.4);
    outline: none;
}

.submit-btn {
    width: 100%;
    background-color: var(--secondary-color);
    color: white;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #0096c7;
}

.disclaimer {
    font-size: 12px;
    color: #777;
    margin-top: 10px;
    text-align: center;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    font-size: 14px;
}
footer a {
    color: var(--accent-color);
}
footer a:hover {
    color: var(--white);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    nav ul {
        flex-wrap: wrap;
    }
    .logo a {
        margin: 10px 20px;
    }
    .service-detail {
        flex-direction: column;
    }
    .service-reverse {
        flex-direction: column;
    }
    .service-image, .service-text {
        width: 100%;
    }
    .service-image {
        margin-bottom: 20px;
        height: 250px;
    }
    .service-text {
        padding: 0;
    }
    .service-reverse .service-text {
         padding: 0;
    }
    .about-grid, .contact-details-grid {
        grid-template-columns: 1fr;
    }
    .team-card {
        width: 45%;
    }
    .map-container {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }
    nav ul {
        padding: 0;
    }
    nav li {
        margin: 0 8px;
    }
    .logo a {
        display: none;
    }
    .intro-box h2 {
        font-size: 28px;
    }

    /* ✅ Fix for cropped header image */
    header {
        background-size: contain !important;
        background-repeat: no-repeat;
        background-position: center center !important;
        height: auto;
        min-height: 300px;
    }

    /* Optional: make nav easier to read on top of light backgrounds */
    nav {
        background-color: rgba(0, 0, 0, 0.5);
    }
}
