/* ============================================
   Nutribalance Dietetics - Custom Styles
   ============================================ */

:root {
    --primary-green: #2D5016;
    --light-green: #E8F5E3;
    --accent-orange: #F39C12;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #F5F5F5;
    --border-light: #DDDDDD;
}

/* General Styles */
html {
    scroll-behavior: smooth;
    color-scheme: light;
}

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

/* Scroll offset so sticky nav doesn't cover section headings */
section[id] {
    scroll-margin-top: 72px;
}

/* Skip to main content (accessibility) */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    background: var(--primary-green);
    color: white;
    padding: .75rem 1.5rem;
    border-radius: 0 0 8px 0;
    font-weight: 600;
    text-decoration: none;
    font-size: .95rem;
}
.skip-to-content:focus {
    left: 0;
    color: white;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 1.8rem;
    right: 1.8rem;
    width: 44px;
    height: 44px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(45,80,22,0.35);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: #1f3610;
    transform: translateY(-3px);
    color: white;
}

/* Section fade-in on scroll */
.fade-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-section.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure touch targets meet 44px minimum (WCAG 2.5.5) */
.btn {
    min-height: 44px;
}
.nav-link {
    min-height: 44px;
    display: flex !important;
    align-items: center;
}

/* Mobile hero: show background image on small screens */
@media (max-width: 991px) {
    #home .hero-mobile-bg {
        display: block;
        height: 240px;
        background: url('../images/hero/2.jpg') center/cover no-repeat;
    }
    #home .col-lg-5 {
        padding: 2.5rem 1.5rem 2rem !important;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
}

a {
    transition: all 0.3s ease;
}

a:not(.btn):hover {
    color: var(--primary-green) !important;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-logo {
    height: 32px;
}

@media (min-width: 576px) {
    .nav-logo { height: 38px; }
}

@media (min-width: 992px) {
    .nav-logo { height: 46px; }
}

.navbar-brand {
    color: var(--primary-green) !important;
    font-size: 1.5rem;
}

.navbar-brand:hover {
    color: var(--accent-orange) !important;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin-right: 0.5rem;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-green) !important;
}

/* Button Styles */
.btn-success {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 0.35rem;
}

.btn-success:hover {
    background-color: #3d6e1b;
    border-color: #3d6e1b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.25);
}

.btn-outline-success {
    color: var(--primary-green);
    border-color: var(--primary-green);
    font-weight: 600;
}

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

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    color: white;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-section .lead {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }
}

/* Card Hover Effects */
.hover-card {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(45, 80, 22, 0.15) !important;
}

/* Service Items */
.service-item {
    padding: 1.5rem;
    border-left: 4px solid var(--primary-green);
    background-color: rgba(232, 245, 227, 0.5);
    border-radius: 0.35rem;
}

.service-item h3 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.service-item p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Footer Styles */
footer {
    background-color: #1a1a1a;
    border-top: 3px solid var(--primary-green);
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    color: var(--light-green);
}

footer h5 {
    color: white;
    border-bottom: 2px solid var(--primary-green);
    padding-bottom: 0.5rem;
    font-weight: 700;
}

footer .list-unstyled li {
    margin-bottom: 0.75rem;
}

/* Background Sections */
.bg-light {
    background-color: var(--bg-light);
}

.section-green {
    background: linear-gradient(135deg, var(--primary-green) 0%, #4a7c2e 100%);
    color: white;
}

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

.img-fluid {
    border-radius: 0.5rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 2rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table td {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

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

/* Accessibility - Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Skip Navigation Link */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.skip-to-main:focus {
    left: 0;
    background-color: var(--primary-green);
    color: white;
    padding: 1rem;
}

/* Responsive Typography */
@media (max-width: 576px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    body {
        font-size: 0.95rem;
    }
}

/* Utility Classes */
.text-primary-green {
    color: var(--primary-green);
}

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

.border-primary-green {
    border-color: var(--primary-green) !important;
}

/* Sections Padding */
section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (max-width: 768px) {
    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* Container Padding */
.container {
    max-width: 1200px;
}

/* Google Maps Embed */
.ratio {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Forms */
.form-control,
.form-select {
    border-color: var(--border-light);
    border-radius: 0.35rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(45, 80, 22, 0.25);
}

label {
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

/* Spinner/Loading States */
.spinner-border {
    color: var(--primary-green);
}

/* Links */
.text-decoration-none:hover {
    text-decoration: underline !important;
}

/* Social Media Icons */
.fa-instagram,
.fa-facebook,
.fa-whatsapp {
    transition: all 0.3s ease;
}

.fa-instagram:hover {
    color: #E4405F;
}

.fa-facebook:hover {
    color: #1877F2;
}

.fa-whatsapp:hover {
    color: #25D366;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn {
        display: none;
    }

    body {
        color: #000;
    }

    a {
        color: #000;
    }
}

/* Social icon buttons */
.social-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-icon-btn:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
    button,
    a {
        text-decoration: underline;
    }

    .btn-success {
        border: 2px solid var(--primary-green);
    }
}

/* ——————————————————————————————
   Services — redesigned
—————————————————————————————— */

/* Service feature cards */
.service-feature-card {
    border-radius: 1rem !important;
}

.service-icon-wrap {
    width: 68px;
    height: 68px;
    background: #e8f5e3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.7rem;
    color: #2D5016;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.service-feature-card:hover .service-icon-wrap {
    background: #2D5016;
    color: #fff;
    transform: scale(1.1);
}

/* Focus area condition pills */
.focus-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: #fff;
    border: 1px solid #c0ddb3;
    color: #2D5016;
    font-size: .8rem;
    font-weight: 500;
    padding: .35rem .9rem;
    border-radius: 100px;
    transition: background 0.2s ease, color 0.2s ease;
}

.focus-pill:hover {
    background: #2D5016;
    color: #fff;
    border-color: #2D5016;
}

/* Session steps (inside collapse) */
.session-step {
    background: #fff;
    border-radius: .75rem;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid #2D5016;
    box-shadow: 0 2px 8px rgba(45,80,22,0.07);
}

.session-step-num {
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: #2D5016;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

/* ——————————————————————————————
   Hero — redesigned
—————————————————————————————— */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-text-panel {
    background: #fff;
    padding: 4rem 3rem 3rem;
    position: relative;
    z-index: 2;
}

/* Subtle dot texture */
.hero-text-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, #b5d8a0 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: 0.18;
    pointer-events: none;
}


.hero-content {
    position: relative;
    z-index: 4;
}

.hero-image-panel {
    background: url('../images/hero/2.jpg') center/cover no-repeat;
    position: relative;
}

/* Warm green tint on the left edge of the image */
.hero-image-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(45,80,22,0.12) 0%, transparent 35%);
    pointer-events: none;
}

/* Credential badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #e8f5e3;
    color: #2D5016;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: .4rem 1rem;
    border-radius: 100px;
    border: 1px solid #c0ddb3;
    margin-bottom: 1.4rem;
    opacity: 0;
    animation: slideUp 0.6s ease 0.15s forwards;
}

.hero-heading {
    font-size: 3rem;
    line-height: 1.1;
    color: #2D5016;
    margin-bottom: 1.4rem;
}

.hero-line-1 {
    display: block;
    opacity: 0;
    animation: slideUp 0.7s ease 0.3s forwards;
}

.hero-line-2 {
    display: block;
    opacity: 0;
    animation: slideUp 0.7s ease 0.48s forwards;
    font-style: italic;
}

.hero-subtitle {
    color: #555;
    font-size: 1.08rem;
    line-height: 1.8;
    border-left: 3px solid #a8d08d;
    padding-left: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: slideUp 0.7s ease 0.64s forwards;
}

.hero-cta {
    opacity: 0;
    animation: slideUp 0.7s ease 0.8s forwards;
}

@media (max-width: 991px) {
    .hero-text-panel {
        padding: 2.5rem 1.5rem 2rem;
    }
    .hero-text-panel::after {
        display: none;
    }
    .hero-heading {
        font-size: 2.2rem;
    }
    #home .hero-mobile-bg {
        border-radius: 0 0 50% 50% / 0 0 12% 12%;
        overflow: hidden;
    }
}
