/* Index Page Specific Styles */

/* Hero Section */
.hero-section {
    background: linear-gradient(45deg, #031633 0%, #164aad 100%); /* Gradient at 45deg from darker blue to lighter blue with specific hex rs */
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh; /* Each section must cover the entire screen */
    /* Removed max-height: 100vh to allow content to expand on smaller screens */
    display: flex;
    align-items: center;
}

.hero-section .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.hero-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-text-box {
    flex: 1;
    max-width: 65%; /* Increased width of title panel */
    padding-right: 40px;
    position: relative; /* Needed for pseudo-element positioning */
    z-index: 1; /* Ensure text is above the glassmorphism effect */
}

.hero-text-box h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.hero-text-box p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-color);
}

.hero-actions .btn {
    margin-right: 15px;
    font-size: 1.1em;
    padding: 15px 30px;
}

.hero-image {
    flex: 1;
    max-width: 50%;
    text-align: right;
}

.hero-design-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-right-panel {
    position: absolute;
    top: 10%;
    right: 10%;
    width: 600px; /* Define a width for the panel to contain elements */
    height: 400px; /* Define a height for the panel */
    display: block; /* Change to block to allow absolute positioning of children */
    z-index: 1;
}

.code-hexagon {
    position: absolute; /* Position absolutely within hero-right-panel */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the hexagon */
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    color: var(--primary-blue);
    transition: transform 0.3s ease;
    z-index: 2; /* Ensure hexagon is above panels */
}

.code-hexagon:hover {
    transform: scale(1.05);
}

.code-panels-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; /* Adjust width to scatter panels around the hexagon */
    height: 300px; /* Adjust height */
    pointer-events: none; /* Allow clicks to pass through */
    z-index: 1; /* Ensure panels are behind the hexagon */
}

.code-panel {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8em;
    color: #00ff00;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 250px;
    height: 180px; /* Fixed height for better consistency */
    overflow: hidden; /* Hide overflowing code */
    opacity: 0;
    animation: fadeInPanel 0.8s forwards;
    pointer-events: auto; /* Re-enable pointer events for panels */
    backdrop-filter: blur(5px); /* Glasmorphism effect for panels */
    -webkit-backdrop-filter: blur(5px);
}

.screen-code {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 5px;
    overflow: hidden;
}

.screen-code-navbar {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.screen-code-navbar .circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.screen-code-navbar .circle.red { background-color: #ff5f56; }
.screen-code-navbar .circle.yellow { background-color: #ffbd2e; }
.screen-code-navbar .circle.blue { background-color: #27c93f; } /* Changed to green for better contrast */

.screen-title {
    flex-grow: 1;
    text-align: center;
    color: #ccc;
    font-size: 0.9em;
}

.code-content {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.8);
    color: #00ff00;
    font-size: 0.75em;
    line-height: 1.4;
}

.code-content pre {
    margin: 0;
}


@keyframes backgroundShaders {
    0% { transform: scale(1) translate(0, 0); opacity: 0.8; }
    50% { transform: scale(1.2) translate(20px, 20px); opacity: 1; }
    100% { transform: scale(1) translate(0, 0); opacity: 0.8; }
}

.code-panel.panel-top-left {
    top: 20px;
    left: 20px;
    animation-delay: 0.2s;
}

.code-panel.panel-bottom-left {
    bottom: -30px; /* Slight deviation to bottom-left */
    left: -30px;
    animation-delay: 0.4s;
}

.code-panel.panel-top-right {
    top: -30px; /* Slight deviation to top-right */
    right: -30px;
    animation-delay: 0.6s;
}

.code-panel.panel-bottom-right {
    bottom: -20px;
    right: 0px;
    animation-delay: 0.8s;
}

@keyframes fadeInPanel {
    to {
        opacity: 1;
    }
}

/* Adjust hero-content-wrapper for the new right panel */
.hero-content-wrapper {
    justify-content: flex-start; /* Align content to the left */
    width: auto; /* Allow content to take natural width */
    position: relative;
    z-index: 2; /* Ensure text is above shapes */
}

.hero-text-box {
    max-width: 65%; /* Adjust width to make space for the right panel */
}

.hero-image {
    display: none; /* Hide the existing hero image as it's replaced by the new design */
}

/* Responsive adjustments for the new hero section layout */
@media (max-width: 992px) {
    .hero-text-box {
        max-width: 65%;
        padding-right: 0;
        text-align: center;
    }

    .hero-text-box h1 {
        font-size: 2.5em; /* Smaller font size for hero title */
    }

    .hero-text-box p {
        font-size: 1em; /* Smaller font size for hero paragraph */
    }
}

@media (max-width: 950px) {
    .hero-section {
        padding-top: 0; /* Set padding-top to 0 for screens under 950px to allow vertical centering */
        align-items: center; /* Keep align-items: center; from default styles */
    }

    .hero-content-wrapper {
        padding-top: 0; /* Remove padding from hero-content-wrapper */
        flex-direction: column; /* Stack children vertically */
        align-items: center; /* Center children horizontally */
        justify-content: center; /* Center children vertically */
    }

    .hero-text-box {
        max-width: 90%; /* Allow more width for text box */
        margin: 0 auto; /* Center the text box horizontally */
        padding-right: 0;
        background: rgba(255, 255, 255, 0.1); /* Light background for glassmorphism */
        backdrop-filter: blur(10px); /* Blur effect */
        -webkit-backdrop-filter: blur(10px); /* Safari support */
        border-radius: 10px; /* Rounded corners */
        padding: 20px; /* Add padding to the text box itself */
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); /* Subtle shadow */
        border: 1px solid rgba(255, 255, 255, 0.3); /* Light border */
    }

    .hero-right-panel {
        position: absolute; /* Keep position: absolute as requested */
        top: 50%; /* Center vertically */
        right: auto;
        left: 50%; /* Center horizontally */
        transform: translate(-50%, -50%); /* Center both horizontally and vertically */
        width: 90%; /* Adjust width for smaller screens */
        /* Ensure internal elements remain absolutely positioned and centered */
    }

    .code-panels-wrapper,
    .code-hexagon {
        display: block; /* Make these elements visible on smaller devices */
    }
}

@media (max-width: 550px) {
    .hero-section {
        padding-top: 0; /* Set padding-top to 0 for screens under 550px */
    }
}

@media (max-width: 400px) {
    .hero-text-box {
        padding-top: 70px; /* Adjusted padding-top to be 20px (base) + 50px (additional) */
    }
}

/* Services Section (on index.html) */
.services-section {
    padding: 80px 0;
    background-color: var(--section-bg-light); /* Reduced white color */
    /* min-height: 100vh; Removed to allow section to expand naturally */
    display: flex; /* Use flexbox to center content vertically */
    flex-direction: column;
    justify-content: center;
}

.services-section .section-title,
.services-section .section-subtitle {
    color: black;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 services per row */
    gap: 30px;
    grid-auto-rows: minmax(250px, auto); /* Ensure consistent row height, adjust as needed */
}

/* Ensure only 2 rows are visible, and content scrolls if more services exist */
.services-grid {
    max-height: auto; /* Set height to auto to remove scrollbar */
    overflow-y: visible; /* Disable vertical scrolling */
    padding-right: 0; /* Remove padding for scrollbar */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 services per row on medium screens */
        /* max-height: calc(3 * 250px + 2 * 30px); Removed to allow grid to expand naturally */
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr; /* 1 service per row on small screens */
        /* max-height: calc(4 * 250px + 3 * 30px); Removed to allow grid to expand naturally */
    }
}

.service-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-size: cover;
    background-position: center;
    color: var(--heading-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 250px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.service-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, var(--dark-blue) 100%);
    opacity: 0.8;
    z-index: 1;
}

.service-card .service-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 10px;
    z-index: 0; /* Ensure image is behind overlay and text */
}

.service-card h3,
.service-card p {
    position: relative;
    z-index: 2;
    color: var(--heading-color);
}

.service-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 0.95em;
    color: var(--text-color);
}

/* Pricing Offer Section */
.pricing-offer-section {
    padding: 80px 0;
    background-color: var(--dark-blue);
    color: var(--text-color);
    text-align: center;
}

.pricing-offer-section .section-title,
.pricing-offer-section .section-subtitle {
    color: var(--heading-color);
}

.pricing-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Slightly smaller min-width */
    gap: 20px; /* Reduced gap */
    margin-top: 40px; /* Reduced margin */
}

.pricing-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px 20px; /* Reduced padding */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pricing-card.highlight {
    position: relative;
    z-index: 1;
    border: none;
    background-color: var(--card-bg);
    overflow: hidden;
}

.pricing-card.highlight::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    background-size: 400% 400%;
    z-index: -1;
    border-radius: 12px;
    animation: glowing-border 8s linear infinite;
}

.pricing-card.highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-bg);
    border-radius: 10px;
    z-index: -1;
    margin: 2px;
}

@keyframes glowing-border {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.pricing-card.highlight:hover {
    transform: translateY(-5px); /* Reduced lift on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); /* Reduced shadow */
}

.pricing-card.highlight {
    border: 2px solid var(--secondary-orange); /* Slightly thinner border */
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.4); /* Reduced glow */
    transform: scale(1.03); /* Slightly smaller scale */
}

.pricing-card.highlight h3 {
    color: var(--secondary-orange);
    font-size: 1.8em; /* Reduced font size */
}

.pricing-card.highlight .price {
    color: var(--secondary-orange);
    font-size: 3em; /* Reduced font size */
}

.pricing-card.highlight .per-month {
    color: var(--secondary-orange);
    font-weight: bold;
}

.pricing-card.highlight ul li i {
    color: var(--secondary-orange);
}

.pricing-card.highlight .annual-cost {
    font-weight: 600;
    color: var(--secondary-orange);
}

.pricing-card.highlight .offer-ends {
    font-weight: 700;
    color: var(--secondary-orange);
    margin-top: 10px; /* Reduced margin */
    font-size: 1.1em; /* Reduced font size */
}

#countdown-timer {
    font-size: 1.3em; /* Reduced font size */
    font-weight: bold;
    color: #ff0000;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.03); opacity: 0.9; } /* Reduced pulse effect */
    100% { transform: scale(1); opacity: 1; }
}

.pricing-card h3 {
    font-size: 1.8em; /* Reduced font size */
    margin-bottom: 15px; /* Reduced margin */
    color: var(--primary-blue);
}

.pricing-card .price {
    font-size: 2.5em; /* Reduced font size */
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 5px;
}

.pricing-card .price span {
    font-size: 0.5em;
    font-weight: 400;
    color: var(--text-color);
}

.pricing-card .per-month {
    font-size: 0.9em; /* Reduced font size */
    color: var(--text-color);
    margin-bottom: 20px; /* Reduced margin */
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px; /* Reduced margin */
    text-align: left;
    flex-grow: 1;
}

.pricing-card ul li {
    margin-bottom: 10px; /* Reduced margin */
    color: var(--text-color);
    font-size: 0.9em; /* Reduced font size */
    display: flex;
    align-items: center;
}

.pricing-card ul li i {
    color: var(--primary-blue);
    margin-right: 8px; /* Reduced margin */
    font-size: 1.1em; /* Reduced font size */
}

.pricing-card .annual-cost {
    font-size: 0.9em; /* Reduced font size */
    color: var(--text-color);
    margin-bottom: 15px; /* Reduced margin */
}

.pricing-card .savings {
    font-size: 1em; /* Reduced font size */
    font-weight: 600;
    color: var(--secondary-orange);
    margin-bottom: 15px; /* Reduced margin */
}

.pricing-card .btn {
    width: 100%;
    padding: 12px; /* Reduced padding */
    font-size: 1em; /* Reduced font size */
}

.offer-note {
    margin-top: 30px; /* Reduced margin */
    font-size: 0.9em; /* Reduced font size */
    color: var(--text-color);
}

@media (max-width: 768px) {
    .pricing-cards-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card h3 {
        font-size: 1.6em; /* Further reduced font size */
    }

    .pricing-card .price {
        font-size: 2.2em; /* Further reduced font size */
    }

    .pricing-card .per-month {
        font-size: 0.8em;
    }

    .pricing-card ul li {
        font-size: 0.8em;
    }

    .pricing-card .annual-cost {
        font-size: 0.8em;
    }

    .pricing-card.highlight h3 {
        font-size: 1.8em;
    }

    .pricing-card.highlight .price {
        font-size: 2.5em;
    }
}

/* About NodeITStudio Section */
.about-nodeitstudio-section {
    padding: 80px 0;
    background-color: #ffffff; /* White background */
    min-height: 100vh; /* Each section must cover the entire screen */
    display: flex; /* Use flexbox to center content vertically */
    flex-direction: column;
    justify-content: center;
    position: relative; /* Needed for absolute positioning of the network card */
    overflow: hidden; /* Hide overflow from the network card */
    align-items: center; /* Center content horizontally */
    text-align: center; /* Center text within the section */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Subtle shadow for depth */
    transition: all 0.3s ease-in-out; /* Smooth transitions for visual effects */
}

.network-card-background {
    position: absolute;
    top: 50%;
    left: -5%;
    transform: translateY(-50%);
    width: 40%;
    height: 40%;
    background-color: var(--light-blue);
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    z-index: 0;
    overflow: hidden;
}

.network-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: transparent; /* Ensure no solid background */
    background-image:
        repeating-linear-gradient(45deg, var(--primary-blue) 0 3px, transparent 3px 200px),
        repeating-linear-gradient(-45deg, var(--light-blue) 0 3px, transparent 3px 200px),
        repeating-linear-gradient(135deg, var(--secondary-orange) 0 3px, transparent 3px 200px),
        repeating-linear-gradient(-135deg, var(--dark-blue) 0 3px, transparent 3px 200px);
    background-size: 400px 400px; /* Even bigger pattern size */
    background-position: 0 0, 100px 0, 200px 100px, 300px 100px; /* Randomized and intercalated positions */
    opacity: 0.7; /* More visible */
}

.about-nodeitstudio-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative; /* Ensure content is above the background card */
    z-index: 1;
}

.about-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
}

.about-image {
    flex: 1;
    max-width: 45%;
    margin-right: 5%;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about-text-box {
    flex: 1;
    max-width: 50%;
}

.about-text-box .section-title {
    text-align: left;
    margin-bottom: 20px;
}

.about-text-box .section-title::after {
    left: 0;
    transform: translateX(0);
}

.about-text-box p {
    margin-bottom: 30px;
    font-size: 1.1em;
    color: #555; /* Darker text for readability on lighter background */
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.stat-item h3 {
    font-size: 2em;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9em;
    color: #6c757d; /* Darker text for readability on lighter background */
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .about-nodeitstudio-section .container {
        flex-direction: column;
        text-align: center;
    }

    .about-content-wrapper {
        flex-direction: column;
    }

    .about-image {
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 30px;
    }

    .about-text-box {
        max-width: 100%;
        text-align: center;
    }

    .about-text-box .section-title {
        text-align: center;
    }

    .about-text-box .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .network-card-background {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
        opacity: 0.3; /* Make it more subtle as a background */
    }
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: var(--section-bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Adjust column ratio for contact form */
    gap: 50px;
    margin-top: 50px;
    align-items: flex-start; /* Align items to the start of the cross axis */
}

.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.info-item i {
    font-size: 2.5em;
    color: var(--primary-blue);
}

.info-item h4 {
    font-size: 1.3em;
    margin-bottom: 5px;
    color: var(--heading-color);
}

.info-item p {
    font-size: 1em;
    color: var(--text-color);
}

.contact-form-wrapper {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1em;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-color-light);
}

.contact-form button {
    width: auto;
    padding: 15px 30px;
    font-size: 1.1em;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }

    .contact-form .form-row {
        flex-direction: column;
        gap: 0;
    }
}
