/* Hero Slider Styles */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 68, 153, 0.8) 0%, rgba(0, 102, 204, 0.6) 100%);
    z-index: 1;
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 20px;
}

.hero-content-inner {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    color: #ffffff;
    margin-bottom: 24px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.6rem;
    color: #ffffff;
    margin-bottom: 35px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-buttons .btn {
    min-width: 180px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.slider-nav:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

.slider-nav::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid #0066cc;
    border-right: 3px solid #0066cc;
}

.slider-prev::before {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.slider-next::before {
    transform: rotate(45deg);
    margin-right: 4px;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 12px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: #ffffff;
    transform: scale(1.3);
}

/* Popup Contact Form */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
}

#contact-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background: #ffffff;
    border-radius: 15px;
    padding: 40px;
    z-index: 9999;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

#contact-popup.active {
    display: block;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: #333;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: #0066cc;
    color: #ffffff;
    transform: rotate(90deg);
}

.popup-header {
    text-align: center;
    margin-bottom: 30px;
}

.popup-header h3 {
    font-size: 2rem;
    color: #0066cc;
    margin-bottom: 10px;
}

.popup-header p {
    color: #666;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.contact-form input.error,
.contact-form textarea.error {
    border-color: #dc3545;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

/* Floating Contact Buttons */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.floating-contact.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.whatsapp-btn {
    background: #25D366;
}

.contact-popup-btn {
    background: #0066cc;
}

.phone-btn {
    background: #007bff;
}

/* Related Projects Section */
.related-projects {
    padding: 60px 0;
    background: #f8f9fa;
}

.related-projects h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.project-filters {
    text-align: center;
    margin-bottom: 40px;
}

.project-category-filter {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.project-category-filter:hover,
.project-category-filter.active {
    background: #0066cc;
    color: #ffffff;
    border-color: #0066cc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.project-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */

/* Tablet (992px and below) */
@media (max-width: 992px) {
    .hero-slider {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-buttons .btn {
        min-width: 160px;
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    .slider-nav {
        width: 45px;
        height: 45px;
    }
    
    .slider-prev {
        left: 15px;
    }
    
    .slider-next {
        right: 15px;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .hero-slider {
        height: 60vh;
        min-height: 450px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 18px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 28px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        min-width: auto;
        padding: 14px 24px;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
        display: none; /* Hide arrows on mobile, use swipe instead */
    }
    
    .slider-dots {
        bottom: 20px;
        gap: 10px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
    }
    
    #contact-popup {
        padding: 30px 20px;
    }
    
    .popup-header h3 {
        font-size: 1.6rem;
    }
    
    .floating-contact {
        bottom: 20px;
        right: 20px;
        gap: 12px;
    }
    
    .floating-btn {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .hero-slider {
        height: 55vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .hero-buttons .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .slider-dots {
        bottom: 15px;
        gap: 8px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.project-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project-item-content {
    padding: 20px;
}

.project-item h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.project-item p {
    color: #666;
    margin-bottom: 15px;
}

.project-item .btn {
    font-size: 0.9rem;
    padding: 8px 20px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #ffffff;
    cursor: pointer;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-slide-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-slide-content p {
        font-size: 1.2rem;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
    
    #contact-popup {
        padding: 25px;
    }
    
    .floating-contact {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Watermark on images */
.watermarked-image {
    position: relative;
    display: inline-block;
}

.watermarked-image::after {
    content: 'okanta.lk';
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 3px;
    font-weight: 600;
}

/* Loading optimization */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* SEO and Performance */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0066cc;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}
