/* Global styles and variables */
:root {
    --color-primary: #0c6d94; /* deep teal */
    --color-secondary: #ef857b; /* soft coral */
    --color-accent: #71b1b0; /* muted green/teal */
    --color-background: #f6fbfc; /* very light background */
    --color-light: #ffffff;
    --color-dark: #2f3e46;
    --max-width: 1200px;
    --transition-speed: 0.3s;
}

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

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    background: var(--color-background);
    color: var(--color-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Page-specific styles */
.page-content {
    flex-grow: 1;
}

.page-header {
    padding: 3rem 0;
    background: var(--color-background);
    text-align: center;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.page-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    color: #555;
}

.about-details,
.service-section,
.content-section {
    padding: 3rem 0;
    background: var(--color-light);
    border-bottom: 1px solid #f0f0f0;
}

.about-details h2,
.service-section h2,
.content-section h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.about-details p,
.service-section p,
.content-section p {
    margin-bottom: 1.2rem;
    color: #444;
    line-height: 1.7;
}

.about-list,
.service-list {
    margin-left: 1.2rem;
    list-style: disc;
    color: #444;
    line-height: 1.6;
}

.service-section + .service-section {
    background: var(--color-background);
}

/* Calculator section */
.calculator-section {
    padding: 4rem 0;
    background: var(--color-light);
}

.calculators {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

.calculator-card {
    flex: 1 1 45%;
    background: var(--color-background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.calculator-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--color-primary);
    text-align: center;
}

.form label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
    color: var(--color-dark);
}

.form input[type="number"] {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.checkbox-group input {
    margin-right: 0.5rem;
}

.form button {
    width: 100%;
    margin-top: 0.5rem;
}

.result-text {
    margin-top: 1rem;
    font-weight: bold;
    color: var(--color-primary);
    min-height: 1.2rem;
}

.disclaimer {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #888;
    text-align: center;
}

@media (max-width: 900px) {
    .calculator-card {
        flex: 1 1 100%;
    }
}

/* Contact page styles */
.contact-section {
    padding: 4rem 0;
    background: var(--color-light);
}

.contact-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-details,
.contact-form-wrapper {
    flex: 1 1 45%;
    background: var(--color-background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.contact-details h2,
.contact-form-wrapper h2 {
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.contact-info {
    list-style: none;
    line-height: 1.7;
    color: #444;
    font-size: 0.95rem;
}

.contact-info li {
    margin-bottom: 0.5rem;
}

.contact-form-wrapper textarea {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

.contact-container .result-text {
    margin-top: 0.8rem;
}

@media (max-width: 900px) {
    .contact-details,
    .contact-form-wrapper {
        flex: 1 1 100%;
    }
}

/* Utility */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Navigation */
.navbar {
    background: var(--color-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Increase top and bottom padding to accommodate larger logo */
    padding: 1rem 0;
}

/* Logo styling: display icon and text horizontally */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--color-primary);
    text-decoration: none;
}

/* Logo images sizing */
/* Increased size to improve brand visibility */
/* Increase slightly from original size for improved visibility without clipping */
/* Logo images: further increased for enhanced visibility */
/* Increase logo size to enhance brand visibility */
.logo img {
    width: 60px;
    height: 60px;
}

/* Footer logo styling */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-light);
    font-size: 1rem;
}

/* Increase footer logo size for better readability */
/* Footer logo slightly larger than original */
/* Footer logo size further increased to better showcase branding */
/* Increase footer logo size to enhance brand visibility */
.footer-logo img {
    width: 45px;
    height: 45px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--color-dark);
    font-size: 0.95rem;
    padding: 0.4rem 0;
    position: relative;
    transition: color var(--transition-speed);
}

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

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

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

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle .hamburger,
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-dark);
    margin: 5px 0;
    transition: transform var(--transition-speed);
}

/* Transform hamburger into X when open */
.nav-toggle.open .hamburger {
    transform: rotate(45deg);
}
.nav-toggle.open .hamburger::before {
    transform: rotate(90deg) translateX(5px);
}
.nav-toggle.open .hamburger::after {
    opacity: 0;
}

/* Hero section */
.hero {
    background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('images/hero.png');
    background-size: cover;
    background-position: center;
    color: var(--color-light);
    display: flex;
    align-items: center;
    min-height: 80vh;
    /* Position relative so watermark pseudo-element can overlay within hero */
    position: relative;
}

/* Add a watermark of the Afia logo in the hero section
   The pseudo-element sits behind the hero content and uses low opacity
   to create a subtle branding effect. See CSS guidance on background-attachment
   and image positioning for watermark implementation【924561720255971†L146-L153】. */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/afia_logo.png');
    background-repeat: no-repeat;
    background-position: center;
    /* Scale watermark to occupy roughly half of the hero width */
    background-size: 60%;
    opacity: 0.08;
    z-index: 0;
}

/* Ensure hero text and buttons appear above the watermark */
.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    padding: 4rem 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background var(--transition-speed), color var(--transition-speed);
}

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

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

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

.secondary-btn:hover {
    background: var(--color-primary);
    color: var(--color-light);
}

/* Features section */
.features {
    padding: 4rem 0;
    background: var(--color-light);
}

.features h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
    color: var(--color-primary);
}

.feature-grid {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.feature-card {
    background: var(--color-background);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 2rem;
    flex: 1 1 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.feature-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    color: var(--color-dark);
}

.feature-card p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    color: #555;
}

.link-arrow {
    color: var(--color-primary);
    font-weight: bold;
    text-decoration: none;
    transition: color var(--transition-speed);
}

.link-arrow:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

/* Callout section */
.callout {
    background: var(--color-primary);
    color: var(--color-light);
    padding: 3rem 0;
    text-align: center;
}

.callout h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.callout p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.callout .secondary-btn {
    border-color: var(--color-light);
}

.callout .secondary-btn:hover {
    background: var(--color-light);
    color: var(--color-primary);
}

/* Footer */
.footer {
    background: var(--color-dark);
    color: var(--color-light);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-nav {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.footer-nav a {
    text-decoration: none;
    color: var(--color-light);
    font-size: 0.9rem;
    transition: color var(--transition-speed);
}

.footer-nav a:hover {
    color: var(--color-secondary);
}

/* Responsive design */
@media (max-width: 900px) {
    .feature-grid {
        flex-direction: column;
    }
    .feature-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    nav ul {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--color-light);
        width: 200px;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-speed) ease-in-out;
    }

    nav ul li {
        border-bottom: 1px solid #eee;
    }

    nav ul li a {
        display: block;
        padding: 0.8rem 1rem;
    }

    .nav-toggle {
        display: block;
    }

    nav.open ul {
        max-height: 300px;
    }
}