:root {
    --ddc-red: rgb(139, 26, 26);
    --ddc-red-dark: rgb(105, 18, 18);
    --ddc-black: #0b0b0b;
    --ddc-panel: #151515;
    --ddc-panel-2: #1c1c1c;
    --ddc-border: #333;
}

/* =========================================================
   FONDO
   ========================================================= */

html,
body {
    background: var(--ddc-black) !important;
    color: #eee !important;
}

/* =========================================================
   BARRA SUPERIOR
   ========================================================= */

.page-header {
    background: #0b0b0b !important;
    border-bottom: 2px solid var(--ddc-red) !important;
}

/* =========================================================
   LOGIN
   ========================================================= */

.user.signin {
    background: var(--ddc-black) !important;
}

/* Tarjeta */
.user.signin .ui.form {
    background: var(--ddc-panel) !important;
    border: 1px solid var(--ddc-border) !important;
    border-top: 4px solid var(--ddc-red) !important;
    border-radius: 10px !important;
    padding: 32px !important;
    box-shadow: 0 15px 45px rgba(0,0,0,.55) !important;
}

/* Textos */
.user.signin label {
    color: #ddd !important;
}

.user.signin h1,
.user.signin h2,
.user.signin h3 {
    color: #fff !important;
}

/* Inputs */
.user.signin input {
    background: var(--ddc-panel-2) !important;
    color: #fff !important;
    border: 1px solid #444 !important;
}

.user.signin input:focus {
    border-color: var(--ddc-red) !important;
    box-shadow: 0 0 0 1px var(--ddc-red) !important;
}

/* Botón */
.user.signin .ui.primary.button {
    background: var(--ddc-red) !important;
    border-color: var(--ddc-red) !important;
    color: white !important;
    font-weight: 600 !important;
}

.user.signin .ui.primary.button:hover {
    background: var(--ddc-red-dark) !important;
}

/* Links */
.user.signin a {
    color: #d58a8a !important;
}

.user.signin a:hover {
    color: #fff !important;
}

/* =========================================================
   COLORES GENERALES DE GITEA
   ========================================================= */

.ui.primary.button,
.ui.primary.buttons .button {
    background: var(--ddc-red) !important;
    border-color: var(--ddc-red) !important;
}

.ui.primary.button:hover,
.ui.primary.buttons .button:hover {
    background: var(--ddc-red-dark) !important;
}

/* Verde Gitea -> rojo DDC */
.ui.green.button,
.ui.green.buttons .button,
.ui.green.label {
    background: var(--ddc-red) !important;
    border-color: var(--ddc-red) !important;
    color: white !important;
}

/* =========================================================
   LOGO INSTITUCIONAL
   ========================================================= */

/*
   Ocultamos los elementos gráficos originales de Gitea
   solamente dentro del enlace de marca.
*/

a.item.brand img,
a.item.brand svg {
    display: none !important;
}

/*
   Logo DDC Cusco
*/

a.item.brand {
    background-image: url("/assets/img/logo-ddc-cusco.png") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;

    width: 190px !important;
    height: 55px !important;

    display: block !important;
}

/* =========================================================
   FOOTER
   ========================================================= */

.page-footer {
    background: #0b0b0b !important;
    border-top: 1px solid #292929 !important;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .user.signin .ui.form {
        margin: 15px !important;
        padding: 24px !important;
    }

    a.item.brand {
        width: 150px !important;
    }
}

/* =========================================================
   LOGO DDC CUSCO - NAVBAR
   ========================================================= */

#navbar-logo img {
    display: none !important;
}

#navbar-logo {
    width: 180px !important;
    height: 55px !important;

    background-image: url("/assets/img/logo-ddc-cusco.png") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* =========================================================
   LOGO EN PANTALLA DE LOGIN
   ========================================================= */

.user.signin::before {
    content: "";
    display: block;

    width: 260px;
    height: 110px;

    margin: 0 auto 25px auto;

    background-image: url("/assets/img/logo-ddc-cusco.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}


/* =========================================================
   DDC CUSCO - PORTADA INSTITUCIONAL
   ========================================================= */

.ddc-home {
    min-height: calc(100vh - 60px);
    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(139, 26, 26, 0.16),
            transparent 38%
        ),
        #050505;

    color: #ffffff;
    padding: 70px 30px 40px;
}


/* HERO */

.ddc-hero {
    max-width: 1100px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 70px;

    min-height: 520px;
}


.ddc-hero-logo {
    flex: 0 0 390px;

    display: flex;
    justify-content: center;
    align-items: center;
}


.ddc-hero-logo img {
    width: 360px;
    max-width: 100%;
    height: auto;

    filter:
        drop-shadow(0 15px 35px rgba(0,0,0,.7))
        drop-shadow(0 0 35px rgba(139,26,26,.15));
}


.ddc-hero-content {
    max-width: 600px;
}


.ddc-line {
    width: 70px;
    height: 5px;

    background: rgb(139, 26, 26);

    margin-bottom: 25px;
}


.ddc-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.05;

    font-weight: 700;

    margin: 0 0 20px;

    color: #ffffff;
}


.ddc-hero h1 span {
    display: block;

    color: rgb(210, 210, 210);
}


.ddc-hero h2 {
    font-size: 22px;
    line-height: 1.4;

    font-weight: 500;

    margin: 0 0 22px;

    color: rgb(220, 220, 220);
}


.ddc-hero p {
    font-size: 17px;
    line-height: 1.75;

    color: rgb(165, 165, 165);

    max-width: 570px;

    margin-bottom: 32px;
}


/* BOTON */

.ddc-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 190px;

    padding: 13px 28px;

    background: rgb(139, 26, 26);
    color: #ffffff !important;

    border: 1px solid rgb(139, 26, 26);
    border-radius: 5px;

    font-size: 16px;
    font-weight: 600;

    text-decoration: none !important;

    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


.ddc-button:hover {
    background: rgb(170, 32, 32);

    transform: translateY(-2px);

    box-shadow:
        0 8px 25px rgba(139, 26, 26, .35);
}


/* SERVICIOS */

.ddc-services {
    max-width: 1100px;

    margin: 40px auto 0;

    padding-top: 55px;

    border-top: 1px solid rgba(255,255,255,.08);

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 30px;
}


.ddc-service {
    padding: 28px;

    background: rgba(255,255,255,.025);

    border: 1px solid rgba(255,255,255,.07);

    border-top: 3px solid rgb(139, 26, 26);

    transition:
        background .2s ease,
        transform .2s ease;
}


.ddc-service:hover {
    background: rgba(139,26,26,.08);

    transform: translateY(-4px);
}


.ddc-service-number {
    color: rgb(139, 26, 26);

    font-size: 14px;

    font-weight: 700;

    letter-spacing: 2px;

    margin-bottom: 15px;
}


.ddc-service h3 {
    color: #ffffff;

    font-size: 19px;

    margin: 0 0 12px;
}


.ddc-service p {
    color: rgb(145,145,145);

    font-size: 14px;

    line-height: 1.6;

    margin: 0;
}


/* PIE INSTITUCIONAL */

.ddc-footer-message {
    max-width: 1100px;

    margin: 65px auto 0;

    text-align: center;
}


.ddc-footer-line {
    width: 40px;
    height: 3px;

    margin: 0 auto 20px;

    background: rgb(139,26,26);
}


.ddc-footer-message p {
    margin: 0 0 6px;

    color: rgb(190,190,190);

    font-size: 14px;

    font-weight: 600;
}


.ddc-footer-message span {
    color: rgb(105,105,105);

    font-size: 12px;
}


/* RESPONSIVE */

@media (max-width: 850px) {

    .ddc-home {
        padding: 45px 20px 30px;
    }

    .ddc-hero {
        flex-direction: column;

        gap: 35px;

        text-align: center;

        min-height: auto;
    }

    .ddc-hero-logo {
        flex-basis: auto;
    }

    .ddc-hero-logo img {
        width: 260px;
    }

    .ddc-line {
        margin-left: auto;
        margin-right: auto;
    }

    .ddc-hero p {
        margin-left: auto;
        margin-right: auto;
    }

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

        margin-top: 50px;
    }
}

/* =========================================================
   PORTADA INSTITUCIONAL - DDC CUSCO
   ========================================================= */

.home .hero {
    max-width: 900px;
    margin: 0 auto;
}

.home .hero .title {
    color: #ffffff !important;
    font-size: 3rem !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    margin-bottom: 1rem !important;
}

.home .hero h2 {
    color: rgb(139, 26, 26) !important;
    font-size: 1.45rem !important;
    font-weight: 600 !important;
    margin-top: 0 !important;
}

.home .institutional-description {
    max-width: 760px;
    margin: 2rem auto 0;
    color: #cfcfcf;
    font-size: 1.1rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .home .hero .title {
        font-size: 2.2rem !important;
    }

    .home .hero h2 {
        font-size: 1.2rem !important;
    }

    .home .institutional-description {
        font-size: 1rem;
        line-height: 1.7;
    }
}

.home .hero {
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.home .hero .title,
.home .hero h2,
.home .institutional-description {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.home .institutional-description {
    max-width: 760px;
}

/* =========================================================
   CENTRADO DE PORTADA DDC CUSCO
   ========================================================= */

.ddc-home {
    text-align: center !important;
}

.ddc-hero {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

.ddc-hero-content {
    width: 100% !important;
    max-width: 850px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}

.ddc-line {
    margin-left: auto !important;
    margin-right: auto !important;
}

.ddc-hero h1,
.ddc-hero h2,
.ddc-hero p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.ddc-hero h1 span {
    display: block;
}

.ddc-hero p {
    max-width: 750px !important;
}

.ddc-button {
    margin-left: auto !important;
    margin-right: auto !important;
}


/* =========================================================
   SERVICIOS CENTRADOS
   ========================================================= */

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

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

.ddc-service-number {
    text-align: center;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 850px) {

    .ddc-hero {
        flex-direction: column !important;
        text-align: center !important;
    }

    .ddc-hero-content {
        max-width: 750px !important;
    }

}
