/* Base Styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #0F131C; /* Dark Background */
    color: #ffffff; /* Light Font */
    -webkit-font-smoothing: antialiased; /* antialiased equivalent */
    -moz-osx-font-smoothing: grayscale; /* antialiased equivalent */
}

/* Container for consistent content width */
.container {
    max-width: 1200px; /* Equivalent to max-w-6xl or similar, assuming this was already there */
}

/* Sticky Header Style */
header {
    position: sticky; /* Make the header stick to the top */
    top: 0; /* Position it at the very top */
    z-index: 1000; /* Ensure it stays above other content when scrolling */
    /* Existing background, text color, padding, and shadow styles are inherited from Tailwind classes in HTML header element directly */
}

/* Ensure anchors land correctly below the sticky header */
#services,
#about,
#contact,
#portfolio { /* Added #portfolio for this page */
    scroll-margin-top: 5rem; /* Adjust this value to match your header's height + desired buffer */
}

/* Default Hero Section Background (for index.html) */
.hero-section-default-bg {
    background-image: url('Gallery/Gemini_Generated_Image_Hero_Background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* --- NEW CSS RULE --- */
/* Specific background for About the Owner Hero */
.hero-about-owner-bg {
    background-image: url('Gallery/Gemini_Generated_Image_Hero_Background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* --- END NEW CSS RULE --- */


/* Loading Spinner (if used on other pages/scripts) */
.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #3498db; /* Blue color for the spinner */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto; /* Center the spinner */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Logo Spin Animation with scale effect (if used via script) */
@keyframes logo-spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(360deg) scale(1.2); } /* Enlarge at halfway point of the spin */
    100% { transform: rotate(720deg) scale(1); } /* Shrink back and complete spin */
}

.animate-logo-spin {
    animation: logo-spin 1.5s ease-out forwards; /* 1.5s duration, ease-out, stays at end state */
}

/* New Custom Classes from HTML Refactoring */

/* 1. Main Content Section Styling */
.main-section {
    padding-top: 4rem; /* py-16 */
    padding-bottom: 4rem; /* py-16 */
    background-color: #161B29; /* bg-[#161B29] - this was adjusted to match index.html for main sections */
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-xl */
    margin-bottom: 3rem; /* mb-12 */
}

/* 2. Main Section Heading Styling */
.section-heading {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700; /* font-bold */
    text-align: center; /* text-center */
    margin-bottom: 3rem; /* mb-12 */
    color: #ffffff; /* text-white - consistent across pages */
}

/* 3. Primary Button Styling (for major calls to action) */
.btn-primary {
    display: inline-block;
    background-color: #ffffff; /* bg-white */
    color: #202239; /* Set the font color for static state */
    padding-left: 2rem;
    padding-right: 2rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition-property: all;
    transition-duration: 300ms;
    transition-timing-function: ease-in-out;
    text-decoration: none;
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.btn-primary:hover {
    background-color: #e5e7eb; /* hover:bg-gray-200 */
    transform: scale(1.05); /* hover:scale-105 */
    color: #202239; /* Set the font color for hover state */
}

/* 4. Secondary Button Styling (for portfolio links, etc.) */
.btn-secondary {
    display: inline-block;
    background-color: #4b5563; /* bg-gray-600 */
    color: #ffffff; /* text-white */
    font-weight: 700;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    transition-property: background-color, transform;
    transition-duration: 300ms;
    transition-timing-function: ease-in-out;
    text-decoration: none;
}
.btn-secondary:hover {
    background-color: #374151; /* hover:bg-gray-700 */
    transform: scale(1.05); /* Add a slight scale for consistency */
}


/* 5. Service Card Styling (for index.html) */
.service-card {
    display: block;
    background-color: #1e293b; /* bg-slate-800 - changed from #1a202c in original css to match HTML */
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 1px solid #4b5563;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    
    transition: background-image 0.5s ease-in-out, background-color 0.5s ease-in-out, box-shadow 0.3s ease-in-out;
}
.service-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* hover:shadow-lg */
}

/* Specific background images for service cards on hover */
.service-card-web:hover {
    background-image: url('Gallery/Gemini_Generated_Image_Web_Development.png');
    background-size: cover;
    background-position: center;
}
.service-card-data:hover {
    background-image: url('Gallery/Gemini_Generated_Image_Data_Analytics.png');
    background-size: cover;
    background-position: center;
}
.service-card-security:hover {
    background-image: url('Gallery/Gemini_Generated_Image_Cybersecurity.png');
    background-size: cover;
    background-position: center;
}
.service-card-ai-custom:hover {
    background-image: url('Gallery/Gemini_Generated_Image_Custom_AI.png');
    background-size: cover;
    background-position: center;
}

/* Service Card Overlay */
.service-card-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: #000000;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.3s ease-in-out;
}
.service-card:hover .service-card-overlay {
    opacity: 0.5;
}

/* Service Card Content Wrapper */
.service-card-content {
    position: relative;
    z-index: 10;
}

/* 6. Service Card Icon Wrapper */
.service-icon-wrapper {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    border-radius: 9999px;
    padding: 0.75rem;
    background-color: #374151;
    width: fit-content;
    transition-property: background-color;
    transition-duration: 300ms;
    transition-timing-function: ease-in-out;
}
.service-card:hover .service-icon-wrapper {
    background-color: #4b5563;
}

/* 7. Service Card Title & Description */
.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 1rem;
    text-align: center;
}
.service-card:hover .service-title {
    color: #ffffff;
}

.service-description {
    color: #d1d5db;
    text-align: center;
}

/* 8. Contact Form Input Fields */
.form-input {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #4b5563;
    border-radius: 0.375rem;
    width: 100%;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
    color: #1f2937;
    line-height: 1.25;
    background-color: #e5e7eb;
}
.form-input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #6b7280;
}
textarea.form-input {
    resize: vertical;
}

/* 9. Header Navigation Links */
.nav-link {
    text-align: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 0.375rem;
    background-color: #3a3e63;
    transition-property: all;
    transition-duration: 300ms;
    transition-timing-function: ease-in-out;
    text-decoration: none;
    color: #ffffff; /* Default link color inherited from header, explicit for nav-link */
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.nav-link:hover {
    color: #d1d5db;
    text-decoration: underline;
}

/* Responsive styles for nav-link on larger screens (md breakpoint) */
@media (min-width: 768px) {
    .nav-link {
        background-color: transparent;
        width: auto;
    }

    /* NEW: Apply min-width to ALL li elements within the main desktop nav */
    #mobileMenu ul > li {
        min-width: 160px; /* <-- ADJUST THIS VALUE TO TUNE THE SPACING */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Keep this rule for the submenu positioning: */
    #servicesSubmenu {
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        min-width: 192px; /* Ensure this is wide enough for 'Web Development' etc. */
        max-width: 250px;
    }
}

/* New: Fade animations for reviews (already existed, kept for completeness) */
.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out; /* Adjust duration as needed */
}

.fade-in {
    opacity: 1;
    transition: opacity 0.5s ease-in; /* Adjust duration as needed */
}

/* Hero Section Base Styles (for all hero sections, like on index and service pages) */
.hero-section-base {
    position: relative;
    padding-top: 5rem;
    padding-bottom: 5rem;
    text-align: center;
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.06);
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    margin-bottom: 3rem;
    overflow: hidden;
    /* Note: text color specific to hero text elements, not the section itself */
}

/* Specific background for Web Development Hero */
.hero-web-dev-bg {
    background-image: url('Gallery/Gemini_Generated_Image_Web_Development.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Specific background for Data Analytics Hero */
.hero-data-analytics-bg {
    background-image: url('Gallery/Gemini_Generated_Image_Data_Analytics.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Specific background for Cybersecurity Hero */
.hero-cybersecurity-bg {
    background-image: url('Gallery/Gemini_Generated_Image_Cybersecurity.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Specific background for Custom Solutions & AI Hero */
.hero-custom-ai-bg {
    background-image: url('Gallery/Gemini_Generated_Image_Custom_AI.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hero Overlay (for dimming background image) */
.hero-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 5;
}

/* Text block for main content paragraphs (e.g., introduction text) */
.text-content-block {
    font-size: 1.125rem;
    color: #d1d5db;
    line-height: 1.625;
    text-align: center;
    /* max-w-4xl and mx-auto should be on the div using this class, not the class itself */
}

/* Apply consistent text styling to lists within main content sections */
.main-section ul,
.main-section ol {
    font-size: 1.125rem;
    color: #d1d5db;
    line-height: 1.625;
    text-align: left;
}

/* Ensure list items inherit correctly if needed (often not strictly necessary but good practice) */
.main-section ul li,
.main-section ol li {
    font-size: inherit;
    color: inherit;
    line-height: inherit;
}

/* Portfolio Card Styling */
.portfolio-card {
    background-color: #1e293b;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #4b5563;
}

/* Portfolio Item Title */
.portfolio-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

/* Portfolio Item Description */
.portfolio-description {
    color: #d1d5db;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}