/* ==========================================================================
   PACIOSOFT.IT - Custom Stylesheet
   Modern, Premium Dark Theme
   ========================================================================== */

/* --- Variables & Theming --- */
:root {
    /* Colors */
    --clr-bg-main: #0b0f19;
    /* Deep slate */
    --clr-bg-alt: #121826;
    /* Slightly lighter background */
    --clr-bg-card: rgba(255, 255, 255, 0.03);

    --clr-primary: #00e5ff;
    /* Vibrant Neon Cyan */
    --clr-primary-glow: rgba(0, 229, 255, 0.4);
    --clr-secondary: #3b82f6;
    /* Deep Blue */

    --clr-text-main: #e2e8f0;
    /* Light grayish blue */
    --clr-text-muted: #94a3b8;

    --clr-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Transitions */
    --ts-fast: 0.2s ease;
    --ts-normal: 0.3s ease-in-out;
    --ts-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --container-width: 1200px;
    --section-pad: 100px 0;
}

/* --- Base Reset & Globals --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--clr-bg-main);
    color: var(--clr-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--clr-text-muted);
}

a {
    color: var(--clr-primary);
    text-decoration: none;
    transition: var(--ts-fast);
}

a:hover {
    color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-padding {
    padding: var(--section-pad);
}

.bg-darker {
    background-color: var(--clr-bg-alt);
}

/* --- Typography Highlights --- */
.highlight {
    color: var(--clr-primary);
    text-shadow: 0 0 20px var(--clr-primary-glow);
}

.section-title {
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

.line {
    height: 4px;
    width: 60px;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
    margin-top: 10px;
    border-radius: 2px;
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--ts-normal);
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.5);
    color: #000;
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: var(--clr-primary);
    background: rgba(0, 229, 255, 0.05);
}

.btn-block {
    display: block;
    width: 100%;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--ts-normal);
    background: transparent;
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--clr-border);
}

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

.logo img {
    height: 150px;
    object-fit: contain;
    margin-top: 0px;
    transition: height var(--ts-normal);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    color: var(--clr-text-main);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--clr-primary);
    transition: var(--ts-normal);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    transition: var(--ts-normal);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--clr-bg-main) 0%, rgba(11, 15, 25, 0.7) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 12px;
}

.about-image img {
    border-radius: 12px;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.image-border {
    position: absolute;
    top: 20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--clr-primary);
    border-radius: 12px;
    z-index: 1;
    transition: var(--ts-normal);
}

.about-image:hover .image-border {
    top: 10px;
    left: -10px;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2rem;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--clr-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--clr-primary);
    transition: var(--ts-fast);
}

.skill-tag:hover {
    background: var(--clr-primary-glow);
    border-color: var(--clr-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--clr-bg-card);
    border: 1px solid var(--clr-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: var(--ts-normal);
    backdrop-filter: blur(10px);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 229, 255, 0.05);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--clr-primary);
}

.service-icon svg {
    width: 30px;
    height: 30px;
}

/* --- Contact Section --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--clr-bg-alt);
    border-radius: 20px;
    padding: clamp(1.5rem, 5vw, 4rem);
    border: 1px solid var(--clr-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.contact-details {
    list-style: none;
    margin-top: 2rem;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--clr-text-main);
}

.contact-details svg {
    width: 24px;
    height: 24px;
    color: var(--clr-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--clr-text-main);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    transition: var(--ts-fast);
}

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

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-message {
    margin-top: 1rem;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid #10b981;
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* --- Footer --- */
.footer {
    background: #06090f;
    padding: 2rem 0;
    border-top: 1px solid var(--clr-border);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--clr-text-muted);
    margin-left: 1.5rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--clr-primary);
}

/* --- Animations --- */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    animation-delay: 0.2s;
    transition-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
    transition-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Media Queries --- */
@media (max-width: 992px) {

    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title {
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .logo img {
        height: 80px;
    }

    .navbar {
        padding: 12px 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--clr-bg-alt);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--clr-border);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    /* Hamburger animation */
    .mobile-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero {
        min-height: 100svh;
        align-items: flex-end;
        padding-bottom: 4rem;
        padding-top: 100px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-overlay {
        background: linear-gradient(to top, var(--clr-bg-main) 30%, rgba(11, 15, 25, 0.75) 100%);
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .about-image {
        max-width: 320px;
        margin: 0 auto;
    }

    .image-border {
        left: -10px;
        top: 10px;
    }

    .section-padding {
        padding: 60px 0;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    .contact-wrapper {
        border-radius: 12px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-links a {
        margin: 0 0.5rem;
    }
}

/* Extra small screens ≤ 480px */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .logo img {
        height: 60px;
    }

    .hero h1 {
        font-size: clamp(1.75rem, 9vw, 2.5rem);
        letter-spacing: -0.5px;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }

    .section-padding {
        padding: 48px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        padding: 1.25rem;
        border-radius: 10px;
    }

    .btn {
        padding: 11px 22px;
        font-size: 0.85rem;
    }

    .skill-tag {
        font-size: 0.78rem;
        padding: 6px 12px;
    }
}