/* Reset and base styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
    margin: 0;
}

/* Header styles */
.main-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    /* ✅ Prevent wrapping */
}

.logo-link {
    text-decoration: none;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    padding-right: 2rem;
}

.logo i {
    font-size: 2rem;
    color: #ffd700;
}

.logo img {
    height: 40px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    /* ✅ reduce spacing so it fits in one row */
    flex-wrap: nowrap;
    /* ✅ force single row */
}

.nav-link,
.admin-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    /* ✅ prevent text breaking */
}

.nav-link:hover,
.admin-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link.btn-login {
    background-color: #007bff;
    /* Primary button color */
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s;
}

.nav-link.btn-login:hover {
    background-color: #0056b3;
    color: #fff;
}

.nav-link.btn-logout {
    background-color: #dc3545;
    /* Red for logout */
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s;
}

.nav-link.btn-logout:hover {
    background-color: #a71d2a;
    color: #fff;
}


.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        flex-direction: column;
        background: #0d1b2a;
        width: 220px;
        padding: 1rem;
        display: none;
    }

    .main-nav.show {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

/* Main content and messages */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Apply uniform spacing to sections */
.section-spacing {
    padding: 6rem 0;
}

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

.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

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

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

.message-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
}

/* Contact page styles */
.contact-hero {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.contact-hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.contact-section {
    padding: 4rem 0;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2,
.contact-form-container h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1e3c72;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    font-size: 1.5rem;
    color: #1e3c72;
    margin-top: 0.25rem;
}

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1e3c72;
}

.contact-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

.btn-call {
    background: #28a745;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* CTA-specific secondary button */
.cta-section .btn-secondary {
    background: #ffcc00;
    /* your color */
    color: #003366;
    /* text color */
}

.cta-section .btn-secondary:hover {
    background: #e6b800;
    /* hover color */
}

/* Form styles */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

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

.error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Map section */
.map-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.map-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1e3c72;
}

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

/* Map box */
#map {
    width: 100%;
    height: 450px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.map-placeholder {
    height: 450px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 1rem;
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #1e3c72;
}

/* Make it responsive */
@media (max-width: 768px) {

    #map,
    .map-placeholder {
        height: 300px;
        /* smaller height on tablets/phones */
    }
}

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

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

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

.footer-section a {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffd700;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #ffd700;
    color: #1e3c72;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 60, 114, 0.7);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    max-width: 800px;
    width: 90%;
    z-index: 2;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-section .hero-text {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 650px;
    margin: 0 auto 2rem;
}

/* Services / Projects / CTA headings */
.services-section h2,
.projects-section h2,
.cta-section h2,
.mb-4 {
    font-size: 2.3rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    color: #0e244e;
}

.hero-content h1,
.services-hero-content h1,
.projects-hero-content h1,
.about-hero-content h1,
.project-hero-content h1,
.contact-hero-content h1,
.products-hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.services-section {
    padding: 80px 20px;
    background-color: #ffffff;
    /* pure white */
}

.projects-section {
    padding: 80px 20px;
    background-color: #dfe8f1;
    /* soft navy tint */
}

.projects-section h2,
.services-section h2 {
    color: #0a3d62;
    /* navy heading */
}

.projects-section .project-card,
.services-section .service-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Add extra spacing below buttons */
.services-button,
.projects-button,
.cta-buttons {
    margin-top: 2.5rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.projects-button {
    text-align: center;
}

/* Media queries merged for hero text and grids */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

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

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

    .about-cta .cta-buttons,
    .contact-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}



/* Page Hero Sections */
.services-hero,
.projects-hero,
.about-hero {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.services-hero-content p,
.projects-hero-content p,
.about-hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Services Page */
.services-main {
    padding: 4rem 0;
    background: white;
}

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

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

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

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

.service-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.service-features i {
    color: #28a745;
    font-size: 0.875rem;
}

.services-cta {
    padding: 4rem 0;
    background: #f8f9fa;
}

/* Projects Page */
.projects-main {
    padding: 4rem 0;
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover,
.related-project-card:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.project-placeholder i {
    font-size: 3rem;
    opacity: 0.7;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #1e3c72;
    font-weight: 600;
}

.project-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.project-year {
    background: #1e3c72;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-location {
    color: #666;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-card,
.related-project-card,
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-content,
.project-content h3,
.project-content p,
.project-location {
    overflow-wrap: anywhere;
    /* modern wrapping */
    word-break: break-word;
    /* fallback */
    white-space: normal;
    max-width: 100%;
}

.no-projects {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-projects i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Edit Project Page Styles */
.edit-project-section {
    min-height: calc(100vh - 500px); /* Adjust based on your header/footer height */
    padding-bottom: 6rem !important; /* Increase bottom spacing */
    margin-bottom: 2rem;
}

.project-edit-card {
    max-width: 1200px;
    margin: 0 auto;
}

.card-header h2 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.section-basic,
.section-images,
.section-location {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.section-images .main-image-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
}

.extra-image-form {
    transition: all 0.3s ease;
}

.extra-image-form:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-label {
    font-weight: 500;
    color: #495057;
}

.text-primary {
    color: #1a73e8 !important;
}

.form-control {
    border-color: #dee2e6;
}

.form-control:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 0.2rem rgba(26,115,232,0.25);
}

.invalid-feedback {
    font-size: 0.875rem;
}

.current-image {
    padding: 0.5rem;
    background-color: #fff;
    border-radius: 0.25rem;
    text-align: center;
}

.btn-primary {
    background-color: #1a73e8;
    border-color: #1a73e8;
}

.btn-primary:hover {
    background-color: #1557b0;
    border-color: #1557b0;
}

.form-actions {
    background-color: #f8f9fa;
    margin: 1rem -1.5rem -1.5rem;
    padding: 1rem 1.5rem;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.projects-map {
    padding: 4rem 0;
    background: #f8f9fa;
}

.projects-map h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1e3c72;
}

.map-container {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.edit-project-section {
    background-color: #f9fafb;
}

.project-edit-card .card {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.project-edit-card label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

/* Add Project Page */
.add-project-section {
    padding: 60px 0;
    background-color: #f7f7f7;
}

.add-project-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.add-project-form .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.add-project-form label {
    font-weight: 600;
    margin-bottom: 8px;
}

.add-project-form input,
.add-project-form textarea,
.add-project-form select {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
}

.add-project-form input[type="file"] {
    padding: 3px 0;
}

.add-project-form .help-text {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.add-project-form .error-text {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 4px;
}

.btn-submit {
    display: inline-block;
    background-color: #0072ff;
    color: #fff;
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: #005fd1;
}

/* About Page */
.about-main {
    padding: 4rem 0;
    background: white;
}

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

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.about-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

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

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

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

.stats-section {
    text-align: center;
    padding: 3rem 0;
    background: #f8f9fa;
    border-radius: 12px;
}

.stats-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1e3c72;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 1.1rem;
}

.about-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.about-cta .cta-content {
    text-align: center;
}

.about-cta .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .services-hero-content h1,
    .projects-hero-content h1,
    .about-hero-content h1 {
        font-size: 2rem;
    }

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

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

    .about-cta .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Project Detail Page Styles */
.project-hero {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 4rem 0;
}

.project-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb span {
    color: #ffd700;
}

.project-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.project-year {
    background: rgba(255, 255, 255, 0.2);
    color: rgb(0, 0, 0);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-location {
    color: rgba(0, 0, 0, 0.9);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-detail {
    padding: 4rem 0;
    background: white;
}

.project-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    /* prevent edge overflow */
    box-sizing: border-box;
    width: 100%;
}

.project-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-image img {
    width: 100%;
    max-width: 800px;
    /* keeps images within a nice width */
    height: 400px;
    /* fixed height */
    object-fit: cover;
    /* crops while keeping aspect ratio */
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

.project-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-description h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1e3c72;
    font-weight: 600;
}

.project-description p {
    color: #666;
    line-height: 1.8;
    font-size: 1.1rem;
}

.project-location-detail h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1e3c72;
    font-weight: 600;
}

.project-map {
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-info-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid #1e3c72;
}

.project-info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #1e3c72;
    font-weight: 600;
}

.project-info-card ul {
    list-style: none;
    padding: 0;
}

.project-info-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
}

.project-info-card li:last-child {
    border-bottom: none;
}

/* Project Gallery Styles */
.project-gallery {
    margin-bottom: 2rem;
}

.project-main-image {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.project-main-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 500px;
}

.project-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.thumbnail-item {
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail-item.active {
    border-color: #007bff;
}

.thumbnail-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

/* Extra Images Form Styles */
.extra-images-container {
    margin-top: 1rem;
}

.extra-image-form {
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
}

.extra-image-form:hover {
    background-color: #e9ecef;
}

/* Clickable Project Cards */
.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.project-link:hover {
    text-decoration: none;
    color: inherit;
}

.project-link-text {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.project-link-text span {
    color: #1e3c72;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.project-card:hover .project-link-text span {
    color: #2a5298;
    transform: translateX(5px);
}

.project-description,
.project-description h2,
.project-description p,
.project-location-detail,
.project-location-detail h2,
.project-location-detail p,
.project-info-card,
.project-info-card li,
.related-project-info,
.related-project-info h4,
.related-project-info p {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    max-width: 100%;
}

/* Map Popup Styles */
.map-popup {
    text-align: center;
    padding: 0.5rem;
}

.map-popup h4 {
    margin-bottom: 0.5rem;
    color: #1e3c72;
    font-weight: 600;
}

.map-popup p {
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.map-popup .btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #1e3c72;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.map-popup .btn:hover {
    background: #2a5298;
}

/* Responsive adjustments for project detail page */
@media (max-width: 768px) {
    .project-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-hero-content h1 {
        font-size: 2rem;
    }

    .project-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Site settings */
.settings-hero {
    padding: 3rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
}

.settings-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.settings-section {
    padding: 3rem 1rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.settings-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.settings-card h2 {
    margin-bottom: 1rem;
    color: #88abce;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
    color: #1e3c72;
    /* dark blue to match theme */
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    color: #000;
}

.current-logo {
    margin-top: 0.5rem;
}

.settings-actions {
    margin-top: 2rem;
    text-align: center;
}

nav a.admin-link {
    background: #2a5298;
    color: #fff !important;
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: bold;
}

nav a.admin-link:hover {
    background: #1e3c72;
    color: #e0e0e0 !important;
}

/* Products Page */
.products-hero {
    padding: 3rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
}

.products-section {
    padding: 3rem 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    position: relative;
    overflow: visible !important;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    opacity: 0.7;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #1e3c72;
    font-weight: 600;
}

.product-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #28a745;
}

/* Buttons inside cards */
.product-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    padding: 1rem;
}

.product-actions .btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.product-actions .btn:hover {
    opacity: 0.9;
}

/* ============================
   Product & For Sale Detail Page
   ============================ */

/* --- Breadcrumb --- */
.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #dbe7ff;
}

.breadcrumb a {
    color: #cce0ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

/* --- Hero Header --- */
.product-hero {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    padding: 2.5rem 1rem;
    text-align: center;
}

.product-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* --- Main Detail Section --- */
.product-detail-section {
    padding: 4rem 1rem;
    background-color: #f9fbfd;
}

.product-detail-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

/* --- Main Image --- */
.main-image {
    width: 100%;
    height: 400px;
    /* ✅ consistent size */
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    background-color: #f0f3f8;
    margin-bottom: 1.5rem;
    display: block;
    transition: all 0.3s ease;
}

.thumbnail {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail.active-thumb {
    border: 2px solid #1e3c72;
    opacity: 0.9;
}

/* Product detail image adjustments: show full image without cropping */
.main-image {
    width: 100%;
    max-height: 600px; /* adjust as needed */
    height: auto;
    object-fit: contain; /* show entire image, no cropping */
    object-position: center;
    display: block;
    background-color: #f8f9fa; /* neutral backdrop for letterboxing */
}

.thumbnail {
    width: 100px;
    height: 100px;
    object-fit: contain; /* show entire thumbnail image */
    object-position: center;
    cursor: pointer;
}

.thumbnail.active-thumb {
    outline: 2px solid #1e3c72;
}
/* --- No Image Placeholder --- */
.no-image-placeholder {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    font-size: 3rem;
    border-radius: 12px;
    opacity: 0.85;
}

/* --- Extra Images --- */
.extra-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1rem;
}

.extra-images img {
    width: 120px;
    height: 120px;
    /* ✅ perfect square thumbnails */
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    border: 2px solid #e6ecf5;
    transition: all 0.3s ease;
    background-color: #f0f3f8;
}

.extra-images img:hover {
    transform: scale(1.05);
    border-color: #1e3c72;
}

/* --- Product Info --- */
.product-detail-info {
    padding-left: 1rem;
}

.product-detail-info h2 {
    font-size: 1.6rem;
    color: #1e3c72;
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-detail-info h3 {
    font-size: 1.2rem;
    color: #2a5298;
    margin-bottom: 0.5rem;
}

.product-detail-info p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.product-detail-info span {
    font-weight: 600;
    color: #1e3c72;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
    margin-top: 1.5rem;
}

.restored-ribbon {
  position: absolute;
  top: 12px;
  right: -16px;
  background: #28a745;
  color: #fff;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 6px 55px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 9999; /* ensures it stays above images/buttons */
  opacity: 1;
  transition: opacity 1s ease-out;
}

.restored-ribbon.fade-out {
  opacity: 0;
}

/* category filter */
.category-filter-form {
    max-width: 500px; /* adjust width if needed */
    margin-bottom: 2rem;
    font-family: 'Poppins', sans-serif;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 1rem; /* space between label and select */
}

.filter-label {
    font-weight: 600;
    color: #333;
    white-space: nowrap; /* prevent label wrapping */
    font-size: medium;
    margin-top: 7px;
}

.filter-select-wrapper {
    position: relative;
    flex: 1; /* dropdown takes remaining space */
}

.filter-select {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    color: #333;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
    outline: none;
}

.select-icon {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 0.9rem;
}

/* --- Back Button --- */
.back-btn-container {
    margin-top: 2.5rem;
}

.back-btn-container a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background-color: #1e3c72;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn-container a:hover {
    background-color: #2a5298;
    transform: translateY(-2px);
}

/* --- Responsive Tweaks --- */
@media (max-width: 992px) {
    .product-detail-info {
        padding-left: 0;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .product-detail-section {
        padding: 2rem 1rem;
    }

    .product-detail-card {
        padding: 1.5rem;
    }

    .product-hero h1 {
        font-size: 1.6rem;
    }

    .main-image,
    .no-image-placeholder {
        height: 300px;
        /* slightly shorter for smaller screens */
    }

    .extra-images img {
        width: 90px;
        height: 90px;
    }
}

/* --- Edit Button --- */
.edit-btn-container {
    margin-top: 1rem;
}

.edit-btn-container a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background-color: #ffc107;
    color: #1e3c72;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.edit-btn-container a:hover {
    background-color: #ffcd39;
    transform: translateY(-2px);
}

/*Add Products Page*/
.add-product-section {
    padding: 60px 0;
    background-color: #f7f7f7;
}

.add-product-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.add-product-form .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.add-product-form label {
    font-weight: 600;
    margin-bottom: 8px;
}

.add-product-form input,
.add-product-form textarea,
.add-product-form select {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
}

.add-product-form input[type="file"] {
    padding: 3px 0;
}

.add-product-form .help-text {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.add-product-form .error-text {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 4px;
}

.btn-submit {
    display: inline-block;
    background-color: #0072ff;
    color: #fff;
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: #005fd1;
}

/* Add Product Button on Products Page */
.add-product-btn-container {
    margin-top: 20px;
    /* Adds space between the text and the button */
}

.add-product-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007BFF;
    /* or match your site's primary color */
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.add-product-btn:hover {
    background-color: #0056b3;
    /* slightly darker on hover */
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

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

/* =====================================
   Shared Edit Form Styling (Product + For Sale)
   ===================================== */

.edit-page-section {
    padding: 4rem 1rem;
    background-color: #f9fbfd;
}

.edit-form-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.edit-form-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e3c72;
    text-align: center;
    margin-bottom: 1rem;
}

.edit-form-card hr {
    border: none;
    border-top: 2px solid #e6ecf5;
    width: 60px;
    margin: 0.5rem auto 2rem auto;
}

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

.edit-item-form label {
    display: block;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.edit-item-form input[type="text"],
.edit-item-form input[type="number"],
.edit-item-form input[type="file"],
.edit-item-form select,
.edit-item-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    background-color: #f9fbfd;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.edit-item-form input:focus,
.edit-item-form textarea:focus,
.edit-item-form select:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.2);
}

.form-error {
    color: #d9534f;
    font-size: 0.9rem;
    margin-top: 4px;
}

.form-btn-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.save-btn,
.cancel-btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.save-btn {
    background-color: #1e3c72;
    color: #fff;
    border: none;
}

.save-btn:hover {
    background-color: #2a5298;
    transform: translateY(-2px);
}

.cancel-btn {
    background-color: #f0f3f8;
    color: #333;
}

.cancel-btn:hover {
    background-color: #d0d7e2;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .edit-form-card {
        padding: 1.5rem;
    }

    .form-btn-container {
        flex-direction: column;
        align-items: stretch;
    }

    .save-btn,
    .cancel-btn {
        width: 100%;
        text-align: center;
    }
}

/* Tabs */
.tab-nav {
    list-style: none;
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.tab-nav li {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    background: #f0f0f0;
}

.tab-nav li.active {
    background: #2a5298;
    color: white;
    font-weight: bold;
}

.tab-nav li a {
    color: inherit;
    text-decoration: none;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.login-card h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1e3c72;
    font-weight: 700;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
    color: #1e3c72;
}

.login-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.error-text {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.3rem;
}

.btn-login {
    display: inline-block;
    width: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.login-footer {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.login-footer a {
    color: #2a5298;
    text-decoration: none;
}

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