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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #d3d3d3;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeSlide {
    0% { opacity: 1; transform: translateX(0); }
    50% { opacity: 0.5; transform: translateX(-50px); }
    100% { opacity: 0; transform: translateX(-100px); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px #001f3f; }
    50% { box-shadow: 0 0 20px #001f3f, 0 0 30px #001f3f; }
    100% { box-shadow: 0 0 5px #001f3f; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes type {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #ffd700; }
}

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

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100vh); }
}

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

/* Header - Updated to orange background */
header {
    background: #FFA500; /* Solid orange header */
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: inline-block;
    vertical-align: middle;
    margin-right: 15px;
}

.logo {
    height: 100px;
    width: auto;
    vertical-align: middle;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0a1a2b;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ffd700;
}

/* Hamburger Icon - Hidden by default, shown on mobile */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    margin-left: 20px;
}

/* Mobile Styles (Screens ≤ 768px) */
@media (max-width: 768px) {
    nav ul {
        display: none; /* Hide full menu on mobile */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #FFA500; /* Match header orange */
        padding: 1rem 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }

    nav ul.show {
        display: flex; /* Show when toggled */
    }

    nav ul li {
        margin: 0;
        text-align: center;
    }

    nav ul li a {
        padding: 0.5rem;
        display: block;
    }

    .hamburger {
        display: block; /* Show hamburger on mobile */
    }
}

/* Hero Slider */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
}

.slide-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #ffd700;
    animation: type 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

.slide-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: #ffd700;
    animation: glow 2s infinite;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,215,0,0.1)"/></svg>') repeat;
    animation: float 20s linear infinite;
}

/* Sections */
.about, .why-choose, .services, .portfolio, .testimonials, .contact {
    padding: 5rem 0;
    background: linear-gradient(135deg, #d3d3d3 0%, #e0e0e0 100%);
}

.about h2, .why-choose h2, .services h2, .portfolio h2, .testimonials h2, .contact h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #001f3f;
    margin-bottom: 2rem;
}

.reasons-grid, .service-grid, .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Increased min-width for better spacing */
    gap: 2rem;
}

.reason-item, .service-item, .portfolio-item {
    background: #f5f5f5;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    border: 1px solid #e0e0e0; /* Subtle border for professionalism */
    position: relative;
    overflow: hidden;
}

.reason-item:hover, .service-item:hover, .portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Portfolio-Specific Styles for GIFs */
.portfolio-item {
    min-height: 400px; /* Uniform height for neat alignment */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    max-height: 200px; /* Limit height to prevent oversized GIFs */
    object-fit: cover; /* Maintain aspect ratio, crop if needed */
    border-radius: 10px;
    display: block;
    margin: 0 auto 1rem auto; /* Center and add bottom margin */
    transition: transform 0.3s ease;
}

.portfolio-item img:hover {
    transform: scale(1.05); /* Subtle zoom on hover for interactivity */
}

.gif-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* Compact grid for multiple GIFs */
    gap: 0.5rem;
    justify-items: center;
    align-items: center;
    max-height: 200px; /* Contain overall height */
    overflow: hidden;
    border: 1px solid #ddd; /* Light border for gallery feel */
    border-radius: 10px;
    padding: 0.5rem;
    background: #fafafa; /* Subtle background */
}

.gif-container img {
    width: 100%;
    max-width: 80px; /* Small, uniform size for each GIF */
    height: auto;
    max-height: 60px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.gif-container img:hover {
    transform: scale(1.1); /* Slight zoom for individual GIFs */
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    object-fit: contain; /* Prevent cropping in modal, scale nicely */
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

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

/* Responsive Design for GIFs and Grid */
@media (max-width: 768px) { /* Tablet and below */
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Fewer columns */
        gap: 1.5rem;
    }
    .portfolio-item {
        min-height: 350px;
        padding: 1.5rem;
    }
    .portfolio-item img {
        max-height: 150px; /* Smaller on mobile */
    }
    .gif-container {
        grid-template-columns: repeat(3, 1fr); /* Force 3 columns for multiple GIFs */
        max-height: 150px;
    }
    .gif-container img {
        max-width: 60px;
        max-height: 45px;
    }
}

@media (max-width: 480px) { /* Mobile */
    .portfolio-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 1rem;
    }
    .portfolio-item {
        min-height: 300px;
        padding: 1rem;
    }
    .portfolio-item img {
        max-height: 120px;
    }
    .gif-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for multiple GIFs */
        max-height: 120px;
    }
    .gif-container img {
        max-width: 50px;
        max-height: 40px;
    }
    .slide-content h2 {
        font-size: 2.5rem; /* Smaller text on mobile */
    }
    .slide-content p {
        font-size: 1.2rem;
    }
}

/* Cursor for clickable images */
.portfolio-item img {
    cursor: pointer;
}
