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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Shared Container Styles */
.container,
.nav-container,
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #374151;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #374151;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 100px 0 100px;
    background-color: #f59e0b; /* Fallback color */
    background: 
        linear-gradient(135deg, rgba(251, 191, 36, 0.4) 0%, rgba(245, 158, 11, 0.4) 50%, rgba(217, 119, 6, 0.4) 100%),
        url('images/bramy/optimized/bramy1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(17, 24, 39, 0.02) 100%);
    pointer-events: none;
}


.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.8) 80%, rgba(255, 255, 255, 1) 100%);
    z-index: 10;
    pointer-events: none;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: #e5e7eb;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.btn-primary:hover {
    background-color: #d97706;
    border-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    background-color: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.btn-secondary:hover {
    background-color: #d97706;
    border-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}


/* Section Styles */
section {
    padding: 80px 0;
}

/* About section - normal padding */
.about {
    padding-top: 80px;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.section-description {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* About and Contact Sections - Shared Background */
.about,
.contact {
    background-color: #f9fafb;
}

/* Shared Grid Layouts */
.about-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-grid {
    margin-top: 3rem;
}

/* Shared Card Styles */
.about-card,
.service-card,
.gallery-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card {
    padding: 2rem;
    text-align: center;
}

/* Shared Hover Effects */
.about-card:hover,
.service-card:hover,
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Shared Icon Styles */
.card-icon,
.contact-icon {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.about-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.about-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Gallery Section */
.gallery {
    background-color: #ffffff;
    padding: 80px 0;
}


.gallery-item {
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid #e5e7eb;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-icon {
    font-size: 2rem;
    color: white;
}

.gallery-item h4 {
    padding: 1.5rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2.5rem;
    border: 1px solid #e5e7eb;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.service-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-card ul {
    list-style: none;
}

.service-card li {
    padding: 0.5rem 0;
    color: #6b7280;
    position: relative;
    padding-left: 1.5rem;
}

.service-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Contact Section */

.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: nowrap;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.contact-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
}

.contact-item h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #1f2937;
    line-height: 1.2;
}

.contact-item p {
    color: #6b7280;
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Special handling for email to ensure it's always visible */
.contact-email p {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: unset !important;
    min-width: max-content;
    flex-shrink: 0;
}

.contact-email {
    min-width: max-content;
    flex-shrink: 0;
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-contact-icon {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    flex-shrink: 0;
}

.footer-contact-item p {
    color: #9ca3af;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.footer-contact-item p:hover {
    color: white;
    transition: color 0.3s ease;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-info {
        gap: 1.5rem;
    }
    
    .contact-item {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

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

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-container {
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.25rem;
    }

    .hero-buttons {
        justify-content: center;
    }
    

    .section-title {
        font-size: 2rem;
    }

    .section-description {
        font-size: 1.125rem;
    }

    .contact-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        max-width: 100%;
        flex-wrap: wrap;
    }
    
    .contact-item {
        width: 100%;
        max-width: 350px;
        justify-content: flex-start;
        flex: none;
    }
    
    .contact-item p {
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
    }

    .about-grid,
    .services-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 2rem;
    }
}

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

    .hero {
        padding: 80px 0 60px;
        background-attachment: scroll;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    

    section {
        padding: 60px 0;
    }

    .about-card,
    .service-card {
        padding: 1.5rem;
    }
    
    .contact-info {
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .contact-item {
        max-width: 320px;
        gap: 0.75rem;
    }
    
    .contact-icon {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }
    
    .contact-item p {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
    }
}

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

.about-card,
.service-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
input:focus,
textarea:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.gallery-modal-content {
    position: relative;
    margin: 2% auto;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gallery-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.gallery-modal-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
}

.gallery-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.3s ease;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.gallery-close:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

.gallery-modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.5rem;
    min-height: 0;
    overflow: visible;
}

.gallery-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: calc(100vh - 300px);
    min-height: 200px;
    overflow: visible;
    position: relative;
    width: 100%;
}

.gallery-image-container img {
    max-width: 100%;
    max-height: calc(100vh - 350px);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: block;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 2rem;
}

.gallery-next {
    right: 2rem;
}

.gallery-modal-footer {
    padding: 1rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    min-height: 120px;
    max-height: 150px;
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    max-height: 60px;
    align-items: center;
}

.gallery-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.gallery-thumbnail:hover {
    border-color: #2563eb;
    transform: scale(1.05);
}

.gallery-thumbnail.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.gallery-counter {
    text-align: center;
    color: #6b7280;
    font-weight: 500;
}

/* Gallery Modal Responsive */
@media (max-width: 768px) {
    .gallery-modal-content {
        width: 95%;
        height: 95vh;
        margin: 2.5% auto;
    }
    
    .gallery-modal-header {
        padding: 1rem;
    }
    
    .gallery-modal-body {
        padding: 1rem;
    }
    
    .gallery-image-container {
        min-height: 200px;
        max-height: calc(100vh - 250px);
        padding: 0.5rem;
    }
    
    .gallery-image-container img {
        max-height: calc(100vh - 300px);
    }
    
    .gallery-modal-footer {
        min-height: 100px;
        max-height: 120px;
    }
    
    .gallery-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        padding: 0.5rem;
    }
    
    .gallery-prev {
        left: 1rem;
    }
    
    .gallery-next {
        right: 1rem;
    }
    
    .gallery-modal-footer {
        padding: 1rem;
    }
    
    .gallery-thumbnail {
        width: 60px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .gallery-modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .gallery-prev {
        left: 0.5rem;
    }
    
    .gallery-next {
        right: 0.5rem;
    }
    
    .gallery-image-container {
        min-height: 150px;
        max-height: calc(100vh - 200px);
        padding: 0.25rem;
    }
    
    .gallery-image-container img {
        max-height: calc(100vh - 250px);
    }
    
    .gallery-modal-footer {
        min-height: 80px;
        max-height: 100px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: #f59e0b;
        border-color: #f59e0b;
    }
    
    .btn-secondary {
        background-color: #f59e0b;
        border-color: #f59e0b;
        color: white;
    }
}
