/* ==========================================================================
    VARIABLES
   ========================================================================== */

:root {
    --color-background: #FDFCF7; /* ultra light warm snow */
    --color-lighter: #FBF9F3; /* soft eggshell */
    --color-light: #F9F6EE; /* soft eggshell */
    --color-dark:     #E5D9C5; /* warm sand */
    --color-darker: #C1AF93;
    --color-primary:      #5F7464; /* sage green */
    --color-second: #2C3531;  /* dark charcoal */
    --border-radius: 8px;
    --section-padding: 60px;
    --header-height: 60px;
    --standard-padding: 20px;
    --double-padding: 40px;
}

/* ==========================================================================
    FONT DEFINITIONS
   ========================================================================== */

@font-face {
    font-family: 'Bodoni Moda';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/bodoni-moda-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Bodoni Moda';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/bodoni-moda-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'Bodoni Moda';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/bodoni-moda-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/montserrat-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/montserrat-500.woff2') format('woff2');
}

/* ==========================================================================
    GLOBAL TYPOGRAPHY RULES
   ========================================================================== */

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6,
a,
button,
.btn {
    font-family: 'Bodoni Moda', serif;
}

/* Weight adjustments for headers & buttons */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.3;
}

button,
.btn {
    font-weight: 500;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: var(--color-second);
    background-color: var(--color-background);
}

.container {
    margin: 0 auto;
    padding: 0 var(--double-padding);
}

/* Header & Nav */
.header {
    background-color: var(--color-primary);
    box-shadow: 0 2px 4px var(--color-second);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    font-family: 'Bodoni Moda', serif;
    font-size: 1.15rem;
    font-weight: 400;
    font-style: italic;
    color: var(--color-light);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.1em;
}

.nav-links a {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-light);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--color-second);
}

/* Hero Section */
.hero {
    background-color: var(--color-background);
    color: var(--color-second);
    text-align: center;
    padding: var(--standard-padding);
}

.hero h1 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-family: 'Bodoni Moda', serif;
    font-size: 2rem;
    margin: 0 auto;
    opacity: 0.9;
    font-style: italic;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-background);
    padding: 10px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    box-shadow: 0 2px 4px var(--color-second);
}

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

/* Content Sections */
.section {
    margin: 0 auto;
    max-width: 1000px;
    padding: var(--section-padding) 0;
    border-bottom: 1px solid var(--color-dark);
}

.section-first {
    margin: 0 auto;
    max-width: none;
    padding: 0 0 var(--section-padding) 0;
    border-bottom: 1px solid var(--color-dark);
}

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

.section h2 {
    font-size: 1.75rem;
    margin-bottom: 20px;
    color: var(--color-second);
}

.section .btn {
    margin-top: var(--standard-padding);
}

#about {
    display: flex;
    flex-direction: row;
}

#about img {
    width: 100%;
    height: 100%;
    max-width: 400px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-dark);
    box-shadow: 0 2px 4px var(--color-light);
    margin: 0 auto;
}

#about div {
    margin: 0 var(--standard-padding) 0 0;
}

@media (max-width: 992px) {
    #about {
        flex-direction: column;
    }
    
    #about div {
        margin: 0 0 var(--standard-padding) 0;
    }
}

@media (max-width: 768px) {
    #about img {
        max-width: none;
    }
}

/* Cards Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: var(--color-lighter);
    color: var(--color-second);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-dark);
    box-shadow: 0 2px 4px var(--color-light);
}

.card-label {
    padding: var(--standard-padding);
}

.card-label h3 {
    margin-bottom: 10px;
    color: var(--color-second);
}

.card-label .btn {
    margin-top: var(--standard-padding);
}

/* Limit grid to max 2 columns */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--standard-padding);
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Portrait Carousel Styling */
.carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slides img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carousel-slides img.active {
    opacity: 1;
}

/* Dot Navigation Overlay */
.carousel-nav {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-nav .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-darker);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.carousel-nav .dot.active {
    background-color: var(--color-light);
    transform: scale(1.3);
}

/* Centering helper */
.text-center {
    text-align: center;
}

.section-subtitle {
    color: var(--color-second);
    margin-bottom: 30px;
}

/* Icon Grid Layout */
.icon-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Icon Card Styling */
.icon-card {
    background: var(--color-lighter);
    border: 1px solid var(--color-dark);
    border-radius: var(--border-radius);
    padding: 30px 40px;
    width: 260px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 4px var(--color-light);
}

.icon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 2px 4px var(--color-dark);
    border-color: var(--color-dark);
}

/* Icon Container */
.icon-wrapper {
    background-color: var(--color-primary);
    color: var(--color-background);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: background-color 0.2s, color 0.2s;
}

.icon-card:hover .icon-wrapper {
    background-color: var(--color-second);
    color: var(--color-background);
}

.icon-card h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: var(--color-second);
}

.icon-card p {
    font-size: 0.95rem;
    color: var(--color-second);
}

.hero-icon {
    margin-bottom: 15px;
    display: inline-block;
}

.hero-icon svg {
    display: block;
    margin: 0 auto;
    color: var(--color-background);
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--standard-padding) 0;
    background-color: var(--color-background);
    color: var(--color-darker);
    font-size: 0.9rem;
    margin-top: 40px;
}

/* Header & Navigation Layout */

.nav-links {
    display: flex;
    gap: 25px;
}

/* Hide Hamburger Button on Desktop */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

/* Hamburger Icon Styling */
.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background-color: var(--color-light);
    transition: background-color 0.2s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--color-light);
    transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* Transform Hamburger into an 'X' when Open */
.nav-toggle.open .hamburger {
    background-color: transparent;
}

.nav-toggle.open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.open .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .nav-toggle {
        display: block; /* Show hamburger button on mobile */
    }

    .nav-links {
        position: absolute;
        top: var(--header-height); /* Position directly below the header */
        left: 0;
        right: 0;
        background-color: var(--color-second);
        box-shadow: 0 2px 4px var(--color-second);
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease-in-out;
    }

    .nav-links.open {
        max-height: 300px; /* Expands open on mobile */
    }

    .nav-links a {
        padding: 10px 0;
        width: 100%;
        text-align: center;
    }
}