/* Index Page Styles */

.section-404 {
    background-color: var(--light-gray);
}

h1.h1-404 {
    margin-top: 70px;
    text-align: center;
    padding: 3rem 1rem 1rem;
    font-size: 3rem;
}

p.p-404 {
    text-align: center;
    padding: 1rem 1rem 3rem;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 120px 0 130px;
    margin-top: 70px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/images/hero/hero-index-desktop.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
}

.webp .hero::before {
    background-image: url('/images/hero/hero-index-desktop.webp');
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero .container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--light-gray);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--light-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-graphic {
    position: relative;
    width: 300px;
    height: 300px;
}

.graphic-element {
    position: absolute;
    border-radius: 20px;
    backdrop-filter: blur(1px);
}

.element-1 {
    width: 200px;
    height: 200px;
    background-color: var(--primary-color);
    top: 0;
    left: 0;
    opacity: 0.9;
}

.element-2 {
    width: 150px;
    height: 150px;
    background-color: var(--secondary-color);
    top: 50px;
    right: 0;
    opacity: 0.8;
}

.element-3 {
    width: 100px;
    height: 100px;
    background-color: var(--accent-color);
    bottom: 0;
    left: 50px;
    opacity: 0.9;
}

/* Services Section */
.services {
    padding: 50px 0 80px;
    background-color: var(--light-gray);
    border-bottom: 2px solid var(--accent-color);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.web-design-icon {
    background-image: url('/images/icons/web-design.svg');
}

.responsive-icon {
    background-image: url('/images/icons/responsive.svg');
}

.ecommerce-icon {
    background-image: url('/images/icons/ecommerce.svg');
}

.seo-icon {
    background-image: url('/images/icons/seo.svg');
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--medium-gray);
    line-height: 1.6;
}

/* Portfolio Section */
.portfolio {
    padding: 50px 0 80px;
    border-bottom: 2px solid var(--accent-color);
    background-color: var(--white);
}

.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.portfolio-item {
    flex: 1 1 340px;
    max-width: 400px;
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-image {
    height: 250px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-image picture {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.portfolio-info p {
    color: var(--medium-gray);
}

/* About Section */
.about {
    padding: 70px 0 80px;
    background-color: var(--light-gray);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-features {
    list-style: none;
    margin-top: 2rem;
}

.about-features li {
    color: var(--medium-gray);
    position: relative;
    padding: 0.5rem 0 0.5rem 1.5rem;
}

.about-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-graphic {
    width: 300px;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    opacity: 0.9;
    display: block;
}

/* Contact Section */
.contact {
    padding: 60px 0 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    text-align: center;
}

.contact .section-title {
    color: var(--white);
}

.contact .section-description {
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
}

.contact-cta {
    margin-top: 3rem;
}

.contact .btn-primary {
    background-color: var(--white);
    color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.contact .btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--black);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.contact-subtitle {
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1067px) {
    .hero::before {
        background-image: url('/images/hero/hero-index-tablet.jpg');
    }

    .webp .hero::before {
        background-image: url('/images/hero/hero-index-tablet.webp');
    }
}

@media (max-width: 800px) {
    .hero::before {
        background-image: url('/images/hero/hero-index-mobile.jpg');
    }

    .webp .hero::before {
        background-image: url('/images/hero/hero-index-mobile.webp');
    }
}

@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero::after {
        background: rgba(0, 0, 0, 0.65);
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-graphic {
        width: 250px;
        height: 250px;
    }

    .element-1 {
        width: 150px;
        height: 150px;
    }

    .element-2 {
        width: 120px;
        height: 120px;
        top: 30px;
        right: 15px;
    }

    .element-3 {
        width: 80px;
        height: 80px;
        bottom: 20px;
        left: 35px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        width: 100%;
        max-width: 550px;
        margin: 0 auto;
    }

    .portfolio-grid {
        flex-direction: column;
    }

    .portfolio-item {
        flex: none;
        width: 100%;
        max-width: 550px;
        margin: 0 auto;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text h2, .about-text p {
        text-align: center;
    }

    .about-features {
        display: table;
        margin-left: auto;
        margin-right: auto;
    }

    .about-graphic {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Focus Management Styles */

/* Portfolio item focus styles */
.portfolio-item:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 4px;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 126, 110, 0.2);
    border-radius: 12px;
}

/* Contact section button focus (on gradient background) */
.contact .btn-primary:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
    box-shadow: 0 0 0 7px rgba(215, 192, 151, 0.4), 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px) scale(1.02);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .portfolio-item:focus-visible {
        transition: none;
        transform: none;
    }

    .portfolio-item:focus-visible {
        box-shadow: 0 0 0 3px var(--primary-color);
    }
}