/* ========================================
   RITES OF PASSAGE - CUSTOM STYLES
   ======================================== */

:root {
    --primary-color: #3c572f;
    --text-color: #333;
    --bg-light: #f5f5f5;
    --bg-dark: #2c2c2c;
    --border-color: #ddd;
    --max-content-width: 919px;
    --max-hero-width: 1500px;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #3D562F; /* Dark green background for wide screens */
    margin: 0;
    padding: 0;
}

.container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.site-header {
    background: transparent;
    box-shadow: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: none;
    padding: 0px;
}

.header-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 20px;
}

.header-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 0;
}

.site-logo {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: #143810;
    min-width: 300px;
    transition: opacity 0.3s ease;
}

.site-logo:hover {
    opacity: 0.8;
}

.logo-text {
    display: none; /* Hidden on all screens */
}

/* Hamburger Menu Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    width: 35px;
}

.hamburger-btn span {
    width: 25px;
    height: 3px;
    background-color: #143810;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu li.mobile-only {
    display: none;
}

.nav-menu a {
    text-decoration: none;
    color: #143810;
    font-weight: 500;
    padding: 0.5rem 0.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: block;
}

.nav-menu a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Submenu Styling */
.has-submenu {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    width: 260px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 0.5rem 0;
    padding-top: 10px;
    margin-top: -10px;
    list-style: none;
    z-index: 1000;
}

.submenu li {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
    display: block;
    width: 100%;
}

.submenu li:last-child {
    border-bottom: none;
}

.submenu a {
    padding: 0.75rem 1rem;
    color: var(--text-color);
    display: block;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
}

.submenu a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Desktop: Show submenu on hover */
@media (min-width: 769px) {
    .has-submenu:hover .submenu {
        display: block;
    }
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .header-nav {
        justify-content: space-between;
    }
    
    .hamburger-btn {
        display: flex;
        margin-left: auto;
        margin-top: 10px;
    }

    .nav-menu {
        position: fixed;
        left: 0;
        top: -100%;
        flex-direction: column;
        background-color: #3D562F;
        width: 100%;
        text-align: center;
        transition: top 0.3s ease-in-out;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        gap: 0;
        padding: 1rem 0;
    }

    .nav-menu.active {
        top: 70px;
    }

    .nav-menu li {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        width: 100%;
        padding: 0 !important;
    }
    
    .nav-menu li.mobile-only {
        display: block;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        padding: 1.25rem 1rem;
        color: #fff;
        width: 100%;
    }
    
    .nav-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    /* Mobile Submenu */
    .has-submenu .submenu {
        position: static;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.2);
        min-width: 100%;
        width: 100%;
        padding: 0;
        margin: 0;
        display: none;
        flex-direction: column;
        left: 0;
        right: 0;
    }
    
    .has-submenu.submenu-open .submenu {
        display: flex;
    }
    
    .submenu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        width: 100%;
        display: block;
    }
    
    .submenu a {
        color: #fff;
        padding: 1rem 1rem;
        font-size: 1rem;
        width: 100%;
        display: block;
        box-sizing: border-box;
    }
    
    .submenu a:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
    background-color: #3D562F; /* Dark green border for wide screens */
}

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: var(--max-hero-width);
    margin: 0 auto;
    height: 500px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: top;
    padding: 0 50px;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    font-family: "Crimson Pro", serif;
    color: #143810;
    letter-spacing: 0.1em;
    margin-left: 7%;
    position: relative;
    margin-top: 160px;
    z-index: 10;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: all 0.5s ease-in-out;
}

/* Responsive Hero Title */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2rem;
        margin-left: 5%;
    }
}

@media (max-width: 768px) {

    .hero-image-container {
        height: 400px;
    }

    .hero-overlay {
        padding: 20px;
        align-items: flex-start;
        padding-top: 50px;
    }

    .hero-title {
        visibility: visible;
        font-size: 24px;
        margin-left: 0;
        text-align: left;
        margin-top: 80px;
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .hero-image-container {
        height: 300px;
    }

    .hero-title {
        font-size: 20px;
        margin-top: 50px;
    }
}

/* ========================================
   SERVICES GRID SECTION
   ======================================== */

.services-grid-section {
    background-color: #fff; /* White background to prevent green showing */
    padding: 0;
    margin: 0;
    max-width: var(--max-hero-width);
    margin: 0 auto;
}

.services-header {
    background-color: #3D562F;
    padding: 0.1rem 0.3rem;
    text-align: center;
    margin: -40px auto 0;
    max-width: 300px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

.services-header h2 {
    color: #fff;
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.services-container {
    padding: 60px 20px;
    background-color: #fff;
    max-width: var(--max-hero-width);
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 0 auto;
}

.service-card {
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid var(--border-color);
    background: #fff;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.service-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Square aspect ratio */
    overflow: hidden;
}

.service-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.service-title-overlay {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    text-align: center;
    transform: translateY(-50%);
}

.service-title-overlay h3 {
    color: #fff;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .services-container {
        padding: 40px 20px;
    }

    .services-header h2 {
        font-size: 2rem;
    }
}

/* ========================================
   SERVICE DETAILS SECTIONS
   ======================================== */

.service-details-wrapper {
    background-color: #fff; /* White background for service details area */
    padding: 60px 20px;
    max-width: var(--max-hero-width);
    margin: 0 auto;
}

.service-detail {
    margin-bottom: 60px;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.service-detail:last-child {
    margin-bottom: 0;
}

.service-detail h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.service-detail h3 {
    color: var(--text-color);
    font-size: 1.75rem;
    margin: 1.5rem 0 1rem;
}

.service-detail p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #555;
}

.service-detail ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.service-detail li {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
    color: #555;
}

@media (max-width: 768px) {
    .service-details-wrapper {
        padding: 40px 0;
    }

    .service-detail {
        padding: 30px 20px;
        margin-bottom: 40px;
    }

    .service-detail h2 {
        font-size: 2rem;
    }

    .service-detail h3 {
        font-size: 1.5rem;
    }

    .service-detail p,
    .service-detail li {
        font-size: 1rem;
    }
}

/* ========================================
   CONTENT PAGES (About, Contact, Forms)
   ======================================== */

.content {
    padding: 60px 20px;
    background-color: #fff; /* White background for content pages */
    max-width: var(--max-hero-width);
    margin: 0 auto;
}

.content-main {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.content-main h1 {
    color: var(--primary-color);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.content-main h2 {
    color: var(--text-color);
    font-size: 2rem;
    margin: 2rem 0 1rem;
}

.content-main p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #555;
}

.content-main ul {
    margin: 0px;
    padding-left: 0px;
}

.content-main li {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 0px;
}

/* About Page - Floating Image */
.about-image {
    float: right;
    max-width: 300px;
    margin: 0 0 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .about-image {
        float: none;
        max-width: 100%;
        margin: 0 0 20px 0;
    }
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.alert li {
    margin-bottom: 0.25rem;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

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

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

.submit-btn {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #5a9bc4;
}

.form-note {
    font-style: italic;
    color: #666;
    margin-top: 1rem;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background-color: var(--bg-dark);
    color: #fff;
    padding: 2rem 0;
    margin-top: 0;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer a {
    color: #fff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-grid {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.hide-mobile {
    display: block;
}

.hide-desktop {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }

    .hide-desktop {
        display: block;
    }
}

/* ========================================
   BREADCRUMB STYLING
   ======================================== */

nav[aria-label="breadcrumb"] a {
    color: var(--primary-color);
    text-decoration: none;
}

nav[aria-label="breadcrumb"] a:hover {
    color: #143810;
    text-decoration: underline;
}

nav[aria-label="breadcrumb"] a[aria-current] {
    color: #143810;
    font-weight: 600;
}
