:root {
    --red: #9B2226;
    --terracotta: #AE5E1A;
    --off-white: #F5F3E7;
    --navy: #2A324B;
    --beige: #E8DDB5;
    --green: #618B4A;
    --blue: #457B9D;
    --purple: #7F5A83;
}

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

body {
    font-family: 'Lora', serif;
    color: var(--navy);
    background-color: var(--off-white);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--red);
    text-align: center;
    margin: 2rem 0;
}

h2 {
    font-size: 2rem;
    color: var(--terracotta);
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background-color: var(--red);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--navy);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
    padding-top: 6rem;
}

.back-link:hover {
    color: var(--red);
}

.back-link i {
    margin-right: 0.5rem;
}

/* Bootstrap Navbar Customization */
.navbar {
    z-index: 1000;
    padding: 1rem 0;
}

.navbar-brand {
    text-decoration: none !important;
}

.navbar-nav .nav-link {
    font-family: 'Lora', serif;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--navy) !important;
    margin-left: 0;
    padding: 0.5rem 0.75rem !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--red) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    background-color: white;
}

.dropdown-item {
    font-family: 'Lora', serif;
    font-size: 0.85rem;
    color: var(--navy);
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(155, 34, 38, 0.1);
    color: var(--red);
    padding-left: 2rem;
}

.navbar-toggler {
    border: none;
    outline: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Dropdown toggle arrow customization */
.dropdown-toggle::after {
    font-size: 0.6rem;
    margin-left: 0.5rem;
}

.dropdown-toggle:hover::after {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* Profile Card Styles */
.craftsman-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin: 3rem 0;
    overflow: visible;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.craftsman-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
    height: 200px;
    position: relative;
    background: linear-gradient(135deg, var(--terracotta), var(--red));
    z-index: 2;
    overflow: visible;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.9;
}

.card-logo {
    width: 120px;
    height: 120px;
    background-color: var(--beige);
    border-radius: 50%;
    position: absolute;
    bottom: -60px;
    left: 2rem;
    border: 5px solid white;
    display: flex ;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.card-logo i {
    font-size: 3rem;
    color: var(--navy);
}

.card-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.card-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding: 2rem;
    padding-top: 4rem;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.card-info h3 {
    font-size: 1.8rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.card-category {
    display: inline-block;
    background-color: var(--beige);
    color: var(--navy);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.card-description {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.card-services h4 {
    color: var(--red);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.card-services ul {
    list-style: none;
    padding-left: 0;
}

.card-services li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.card-services li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: bold;
}

.card-sidebar {
    background-color: var(--off-white);
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h4 {
    color: var(--red);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.contact-item a {
    color: #007bff;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-icon {
    width: 35px;
    color: var(--red);
    font-size: 1.1rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating .stars {
    color: #ffd700;
}

.rating-text {
    font-size: 0.9rem;
    color: var(--navy);
}

.gallery {
    margin-top: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.gallery-item {
    aspect-ratio: 1;
    background-color: var(--beige);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Override conflicting styles from style.css */
.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1.5rem !important;
}

.navbar {
    z-index: 1000 !important;
    padding: 1rem 0 !important;
}

.navbar-brand {
    text-decoration: none !important;
}

.navbar-nav .nav-link {
    font-family: 'Lora', serif !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    font-size: 0.9rem !important;
    letter-spacing: 1px !important;
    color: var(--navy) !important;
    margin-left: 0 !important;
    padding: 0.5rem 0.75rem !important;
    transition: color 0.3s ease !important;
}

.navbar-nav .nav-link:hover {
    color: var(--red) !important;
}

.dropdown-menu {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    padding: 0.5rem 0 !important;
    margin-top: 0.5rem !important;
    background-color: white !important;
}

.dropdown-item {
    font-family: 'Lora', serif !important;
    font-size: 0.85rem !important;
    color: var(--navy) !important;
    padding: 0.5rem 1.5rem !important;
    transition: all 0.3s ease !important;
}

.dropdown-item:hover {
    background-color: rgba(155, 34, 38, 0.1) !important;
    color: var(--red) !important;
    padding-left: 2rem !important;
}

.navbar-toggler {
    border: none !important;
    outline: none !important;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}

.dropdown-toggle::after {
    font-size: 0.6rem !important;
    margin-left: 0.5rem !important;
}

.dropdown-toggle:hover::after {
    transform: rotate(180deg) !important;
    transition: transform 0.3s ease !important;
}

/* Responsive */
@media (max-width: 768px) {
    .card-content {
        grid-template-columns: 1fr;
        padding-top: 5rem;
    }

    .card-logo {
        left: 50%;
        transform: translateX(-50%);
    }

    .card-info {
        /* text-align: center; */
        margin-top: 5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .card-content {
        padding: 1.5rem;
    }

    .card-sidebar {
        padding: 1.5rem;
    }
}

/* Image Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: var(--red);
}

#modalCaption {
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
}

/* Add cursor pointer to gallery items */
.gallery-item {
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    border-radius: 50%;
    color: white;
}

.gallery-item:hover::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 10px;
    }
    
    .close {
        font-size: 28px;
        right: 15px;
        top: 5px;
    }
    
    .gallery-item::after {
        opacity: 1;
        font-size: 1.2rem;
    }

    .card-content {
        margin-top: 3.5rem;
    }
}


@media (max-width: 480px) {
    .card-content {
        padding: 0.5rem ;
    }

}
