/* Hyderabad Project Images */
.project-gallery .main-image {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.project-gallery .main-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Two-column layout for larger screens */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Tablet view */
    .project-gallery .main-image {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 95%;
        margin: 0 auto 30px;
    }
    
    .project-gallery .main-image img {
        width: 100%;
        height: 280px;
        object-fit: cover;
    }
}

/* Desktop layout */
@media (min-width: 1024px) {
    .project-gallery .main-image {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 1200px;
        margin: 0 auto 40px;
    }
    
    .project-gallery .main-image img {
        width: 100%;
        height: 320px;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
}

/* Single column for mobile */
@media (max-width: 767px) {
    .project-gallery .main-image {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .project-gallery .main-image img {
        width: 100%;
        height: 250px; /* Slightly smaller height for mobile */
        object-fit: cover;
    }
}

/* Hover effect for better interactivity */
.project-gallery .main-image img:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* About Us Section */
.about {
    background-color: var(--off-white);
    text-align: center;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.about:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.about .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-content {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.about .section-title {
    color: var(--dark);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.about h3 {
    font-size: 2.2rem;
    color: var(--primary);
    margin: 15px auto 15px;
    font-family: var(--font-heading);
    max-width: 100%;
    text-align: center;
    position: relative;
    display: inline-block;
}

.about h3:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.about h4 {
    font-size: 1.5rem;
    color: var(--dark);
    margin: 0 auto 25px;
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    text-align: center;
    max-width: 100%;
}

.about h4:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background: var(--primary);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.about p {
    color: var(--text);
    line-height: 1.8;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    max-width: 800px;
    text-align: center;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .about h3 {
        font-size: 1.8rem;
    }
    
    .about h4 {
        font-size: 1.3rem;
    }
    
    .about p {
        font-size: 1rem;
    }
}

/* Project Inquiry Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 35px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 4px solid var(--primary);
}

.modal-header {
    margin-bottom: 25px;
    text-align: center;
}

.modal-header h2 {
    color: var(--primary);
    margin: 0;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.modal-header h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.modal h2 {
    color: var(--primary);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    text-align: left;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #f9f9f9;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
    background-color: #fff;
    outline: none;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 35px;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.modal .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(255, 107, 0, 0.2);
}

.modal .btn-primary:hover {
    background-color: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px 15px;
    }
    
    .modal h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
}

/* Video Carousel */
.video-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: #000;
}

.video-carousel-container {
    position: relative;
    width: 100%;
    max-height: 80vh; /* Limit maximum height for better visibility */
    aspect-ratio: 16/9; /* Maintain aspect ratio */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-carousel-slide.active {
    opacity: 1;
}

.video-carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from 'cover' to 'contain' to show full video */
    max-width: 100%;
    max-height: 100%;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 10;
    padding: 0 15px;
}

.carousel-nav button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav button:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* Projects Section */
.projects {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.projects .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.projects .section-tag {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.projects .section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--dark);
    font-family: var(--font-heading);
    font-weight: 700;
}

.projects .section-subtitle {
    color: var(--text);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* Projects Container */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-category {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.project-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.project-category-header h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin: 0;
    font-weight: 700;
    font-family: var(--font-heading);
}

.project-dropdown {
    position: relative;
}

.project-dropdown .dropdown-toggle {
    background: var(--light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    transition: all 0.3s ease;
}

.project-dropdown .dropdown-toggle:hover {
    background: var(--primary);
    color: var(--white);
}

.project-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    min-width: 280px; /* Increased from 250px to accommodate longer text */
    width: max-content; /* Ensure width fits content */
    max-width: 320px; /* Set a max-width to prevent it from becoming too wide */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: visible; /* Ensure text is not cut off */
}

.project-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.project-dropdown .dropdown-menu a {
    display: block;
    padding: 12px 25px; /* Increased padding for better spacing */
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1rem; /* Slightly larger font for better readability */
    font-weight: 500;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: visible; /* Ensure text is not cut off */
    text-overflow: ellipsis; /* Add ellipsis if text is too long */
    width: 100%; /* Ensure full width for proper hover effect */
    box-sizing: border-box; /* Include padding in width calculation */
}

.project-dropdown .dropdown-menu a:hover {
    background: var(--light);
    color: var(--primary);
    padding-left: 25px;
}

.project-dropdown .dropdown-menu a.view-all {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 5px;
    padding-top: 12px;
    color: var(--primary);
    font-weight: 600;
}

.project-preview {
    position: relative;
    height: 250px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    background-color: #f5f5f5; /* Light background for any empty space */
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

/* Adjust for laptop/desktop screens */
@media (min-width: 992px) {
    .project-preview {
        height: 250px;
        aspect-ratio: 16/9; /* Standard landscape ratio */
        max-width: 100%;
    }
    
    .project-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .projects-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 2rem;
    }
}

.project-category:hover .project-preview img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 30px 25px;
    color: var(--white);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.project-category:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.btn-outline {
    display: inline-block;
    padding: 8px 20px;
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

/* Location Map */
.location-map {
    background-color: #f9f9f9;
}

.map-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.map-container iframe {
    width: 100%;
    display: block;
    border: none;
}

.map-address {
    background: #fff;
    padding: 2rem;
    text-align: center;
}

.map-address h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.map-address h3 i {
    color: #e74c3c;
}

.map-address p {
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.map-address .btn-outline {
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.map-address .btn-outline:hover {
    background: #e74c3c;
    color: #fff;
    transform: translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
    }
    
    .project-category-header h3 {
        font-size: 1.3rem;
    }
    
    .project-overlay {
        transform: translateY(0);
    }
}

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

.project-category {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.project-category:nth-child(1) { animation-delay: 0.1s; }
.project-category:nth-child(2) { animation-delay: 0.2s; }
