/* ============================================================
   STYLES.CSS
   OSOJI SYSTEMS - Estils generals de portada i elements comuns
   ------------------------------------------------------------
   Conté:
   - Variables i configuració global
   - Estructura base
   - Hero de portada
   - Graella de serveis de la home
   - Estils de suport
   - Elements legals i cross-selling
   - Banner de cookies
   - Responsive de portada
   ============================================================ */

/* 1. VARIABLES I RESET GLOBAL
   ------------------------------------------------------------ */

   :root {
    --gris-petroli: #2c3e50;
    --groc-osoji: #ffcc00;
    --blanc: #ffffff;
    --max-width: 1200px;
    --espai-simetric: 12px;
}

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

/* Cos general de la pàgina */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #fdfdfd;
    padding-top: 0px;
}

/* Contenidor principal */
.site-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* 2. HERO HOME (PORTADA)
   ------------------------------------------------------------ */

   .hero-home {
    background: #800000 url('/assets/img/home/cortina-hero.png') no-repeat center center;
    background-size: cover;
    min-height: 430px;
    display: flex;
    align-items: center;
    color: var(--blanc);
    margin-top: 18px;
    margin-bottom: var(--espai-simetric);
}


.hero-content {
    width: 100%;
    padding: 48px 60px 64px;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 400;
    line-height: 1.05;
    color: var(--blanc);
    margin-bottom: 18px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.hero-subline {
    list-style: none;
    margin-bottom: 30px;
    font-size: 1.25rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.hero-subline li {
    margin-bottom: 12px;
    color: var(--blanc);
}

/* Botó principal de portada */
.btn-cta {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    background: var(--blanc);
    color: var(--gris-petroli);
    padding: 14px 35px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    transition: 0.3s;
}

.btn-cta:hover {
    background: var(--groc-osoji);
}

/* 3. GRAELLA DE SERVEIS (HOME)
   ------------------------------------------------------------ */

.home-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--espai-simetric);
}

/* Targeta de servei */
.home-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

/* Imatges dins de la targeta */
.home-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease-in-out;
}

/* Contenidor per a efectes abans/després */
.img-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Imatge hover */
.img-hover {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    object-fit: cover;
}

/* Efectes hover */
.home-item:hover .img-hover {
    opacity: 1;
}

.home-item:hover > img,
.home-item:hover .img-container > img:first-child {
    transform: scale(1.05);
}

/* Text sobreposat */
.home-text-overlay {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 10;
    color: var(--blanc);
    font-size: 1rem;
    line-height: 1.35;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

/* 4. ESTILS DE SUPORT
   ------------------------------------------------------------ */

.hero-interior {
    height: 250px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    color: var(--blanc);
}

.hero-interior h1 {
    padding: 0 40px;
    font-size: 2.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.content-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-bottom: 50px;
}

.main-text h2 {
    color: var(--gris-petroli);
    margin-bottom: 20px;
}

.main-text h3 {
    margin: 25px 0 15px 0;
    border-left: 4px solid var(--groc-osoji);
    padding-left: 15px;
}

.main-text p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: #444;
}

.main-text ul {
    margin-left: 20px;
    margin-bottom: 20px;
    list-style: disc;
}

.main-text li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.contact-card {
    background: #f4f4f4;
    padding: 25px;
    border-top: 3px solid var(--groc-osoji);
}

.contact-card h4 {
    margin-bottom: 15px;
    text-transform: uppercase;
}

.btn-sidebar {
    display: block;
    background: var(--gris-petroli);
    color: var(--blanc) !important;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    margin-top: 10px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-sidebar:hover {
    background: var(--groc-osoji);
    color: var(--gris-petroli) !important;
}

/* 5. ELEMENTS LEGALS I CROSS-SELLING
   ------------------------------------------------------------ */

.legal-content h3 {
    margin-top: 25px;
    color: #2c3e50;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.legal-content p,
.legal-content li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

.cross-selling {
    margin-top: 40px;
    padding: 20px;
    background-color: #f0f4f7;
    border-left: 5px solid var(--groc-osoji);
    border-radius: 0 4px 4px 0;
}

.cross-selling-title {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
    font-weight: bold;
}

.cross-selling-links {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cross-selling-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.cross-selling-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cross-selling-icon--groc {
    background-color: var(--groc-osoji);
}

.cross-selling-icon--fosc {
    background-color: #34495e;
}

.cross-selling-icon--vermell {
    background-color: #c0392b;
}

.cross-selling-icon--verd {
    background-color: #27ae60;
}

.cross-selling-icon--blau {
    background-color: #2980b9;
}

.cross-selling-icon img {
    width: 14px;
    height: 14px;
}

.cross-selling-text--groc {
    border-bottom: 2px solid var(--groc-osoji);
    padding-bottom: 2px;
}

.cross-selling-text--fosc {
    border-bottom: 2px solid #34495e;
    padding-bottom: 2px;
}

.cross-selling-text--vermell {
    border-bottom: 2px solid #c0392b;
    padding-bottom: 2px;
}

.cross-selling-text--verd {
    border-bottom: 2px solid #27ae60;
    padding-bottom: 2px;
}

.cross-selling-text--blau {
    border-bottom: 2px solid #2980b9;
    padding-bottom: 2px;
}

/* 6. BANNER DE COOKIES
   ------------------------------------------------------------ */

.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--groc-osoji);
    color: #000;
    padding: 20px;
    z-index: 10000;
    font-size: 14px;
}

.cookie-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    background-color: var(--blanc);
    color: #000;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
}

.cookie-accept:hover,
.cookie-info:hover {
    background-color: #eee;
}

/* 7. RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 1024px) {
    .home-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-container {
        grid-template-columns: 1fr;
    }

    .hero-home {
        min-height: 380px;
    }

    .hero-content {
        padding: 42px 36px 52px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-subline {
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    .home-grid {
        grid-template-columns: 1fr;
    }

    .cookie-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .hero-home {
        min-height: 320px;
    }

    .hero-content {
        padding: 32px 22px 40px;
    }

    .hero-content h1 {
        font-size: 1.9rem;
    }

    .hero-subline {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .btn-cta {
        padding: 13px 22px;
        font-size: 13px;
    }

    .home-text-overlay {
        font-size: 0.95rem;
    }
}
