:root {
    --bg-color: #FFC6D4; 
    --text-dark: #634b58; 
    --text-pink: #DE556D; 
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #11111100; }
::-webkit-scrollbar-thumb { background: var(--text-pink); border-radius: 0px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-pink); }

body{
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-color); 
    background-image: url('../icons/about/fondo.png'); 
    background-size: cover; 
    background-position: center; 
    background-attachment: scroll; 
    color: var(--text-dark);
}

.principal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 97%; 
    margin: 0 auto;
}

.header-container {
    max-width: 97%; 
    width: 100%;
    background: rgba(255, 255, 255, 0);
    padding-top: 20px;
}

.container {
    max-width: 1400px; 
    width: 100%;
    background: rgb(255, 255, 255);
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px;
}

.window-header {
    background-color: white;
    border-radius: 15px; 
    border: 2px solid var(--text-pink); 
    margin-bottom: 20px;
    position: relative; 
}

.tabs-container {
    display: flex;
    background-color: white; 
    border-bottom: 2px solid var(--text-pink);
    padding: 5px 10px 0 10px; 
    align-items: flex-end; 
    border-radius: 15px 15px 0 0;
}

.tab {
    color: var(--text-dark);
    border: 2px solid var(--text-pink);
    border-bottom: none; 
    border-radius: 10px 10px 0 0; 
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.casa-tab {
    padding: 10px 20px;
    font-size: 0.95em;
    background-color: white; 
    z-index: 1;
}

.enlace-casa {
    text-decoration: none;
    color: var(--text-dark);
    
}

.about-tab {
    padding: 5px 15px; 
    font-size: 0.85em; 
    background-color: white; 
    color: var(--text-pink);
    margin-bottom: -2px; 
    padding-bottom: 7px; 
    margin-left: -5px; 
    z-index: 2;
}

.header-main {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 10px 20px;
    background-color: white;
    position: relative; 
    min-height: 50px;
    border-radius: 0 0 15px 15px;
}

.logo-img {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    object-fit: cover;
    z-index: 2;
}

.logo-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%); 
    font-size: 2em;
    font-weight: normal;
    color: var(--text-pink);
    letter-spacing: 2px;
    white-space: nowrap;
    z-index: 1; 
    font-family: 'Pacifico', cursive;
}

.heart-menu-btn {
    background: none;
    border: none;
    color: var(--text-pink);
    font-size: 2.2em;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2; 
}

.heart-menu-btn:hover {
    transform: scale(1.1);
    color: #ff4785;
}

.dropdown-menu {
    display: none; 
    position: absolute;
    top: 100%; 
    right: 0;
    background-color: white;
    border: 2px solid var(--text-pink);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 20px rgba(216, 92, 138, 0.2);
    z-index: 1000;
    min-width: 150px;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px; 
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-menu a {
    font-family: 'Delius', cursive; 
    color: var(--text-pink); 
    text-decoration: none;
    font-size: 1.1em;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-menu a:hover {
    background-color: var(--text-pink);
    color: white;
}

.theme-p1 {
    --p-bg: #ffe4e1;
    --p-bg-img: url('../icons/proyectos/proyecto1/Fondo.png');
    --p-title-font: 'Margarine', sans-serif;
    --p-title-color: #603724;
    --p-heading-color: #603724;
    --p-ribbon-bg: #FFF889;
    --p-ribbon-text: #603724;
    --p-box-border: #FFF889;
    --p-box-bg: rgba(255, 248, 137, 0.43);
    --p-text-color: #603724;
}

.theme-p2 {
    --p-bg: #D9D255;
    --p-bg-img: url('../icons/proyectos/fondo-caperucita.png');
    --p-title-font: 'Margarine', sans-serif;
    --p-title-color: #E82D2A;
    --p-heading-color: #FFFFFF;
    --p-ribbon-bg: #C21B19;
    --p-ribbon-text: #FFFFFF;
    --p-box-border: #C21B19;
    --p-box-bg: rgba(194, 27, 25, 0.43);
    --p-text-color: #FFFFFF;
}

.theme-p3 {
    --p-bg: #6F2F2C;
    --p-bg-img: url('../icons/proyectos/fondo-merche.png');
    --p-title-font: 'Playfair Display', serif;
    --p-title-color: #6F2F2C;
    --p-heading-color: #FFFFFF;
    --p-ribbon-bg: #FFC5D4;
    --p-ribbon-text: #6F2F2C;
    --p-box-border: #FFC5D4;
    --p-box-bg: rgba(255, 197, 212, 0.43);
    --p-text-color: #FFFFFF;
}

.theme-p4 {
    --p-bg: #3A4780;
    --p-bg-img: url('../icons/proyectos/fondo-honobichi.png');
    --p-title-font: 'Playfair Display', serif;
    --p-title-color: #0F1545;
    --p-heading-color: #FFFFFF;
    --p-ribbon-bg: #0F1545;
    --p-ribbon-text: #FFFFFF;
    --p-box-border: #0F1545;
    --p-box-bg: rgba(15, 21, 69, 0.43);
    --p-text-color: #FFFFFF;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 50px; 
}

.project-container {
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif; 
    color: var(--p-text-color);
}

.project-header {
    position: relative;
    height: 180px; 
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: flex-end; 
    padding: 0 30px;
    overflow: hidden; 
}
.project-header img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; 
    z-index: 1; 
}
.project-header h1 {
    position: relative;
    z-index: 2; 
    font-family: var(--p-title-font); 
    color: var(--p-title-color); 
    margin: 0; 
    font-size: 2.2em;
    padding: 10px 20px;
    border-radius: 12px;
}
.titulo-caperucita {
    position: relative;
    z-index: 2; 
    font-family: var(--p-title-font); 
    color: var(--p-title-color); 
    margin: 0; 
    font-size: 2.2em;
    padding: 10px 20px;
    border-radius: 12px;
    right: 36%;
    letter-spacing: 5px;
}
.titulo-honobichi {
    position: relative;
    z-index: 2; 
    color: var(--p-title-color); 
    margin: 0; 
    font-size: 2.2em;
    padding: 10px 20px;
    border-radius: 12px;
    right: 36%;
    letter-spacing: 5px;
}

.project-body {
    background-color: var(--p-bg);
    background-image: var(--p-bg-img);
    background-size: cover;
    background-position: center;
    padding-bottom: 30px;
    padding-top: 10px;
}

.pink-ribbon {
    background-color: var(--p-ribbon-bg); 
    color: var(--p-ribbon-text); 
    font-family: var(--p-title-font);
    text-align: center; 
    font-size: 2.1em; 
    padding: 5px 0; 
    margin: 20px 0; 
}

.project-desc {
    text-align: center;
    font-size: 1.1em;
    margin: 0 20px 20px 20px;
    line-height: 1.6;
    background: rgba(255,255,255,0.2); 
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
}

.project-content {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 25px; 
}

.subsection {
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    padding: 15px 30px; 
    background: var(--p-box-bg);
    max-width: 95%; 
}
.subsection h3 {
    font-weight: normal; 
    font-size: 1.3em; 
    margin: 0 0 15px 0; 
    color: var(--p-heading-color); 
    text-align: center; 
    font-family: var(--p-title-font);
}

.align-center { align-self: center; width: fit-content; }
.align-left { align-self: flex-start; width: fit-content; }
.align-left h3 { text-align: left; } 
.align-right { align-self: flex-end; width: fit-content; }
.align-right h3 { text-align: right; } 

.flex-center-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.flex-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.image-box {
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease; 
    cursor: pointer; 
}

.image-box:hover {
    transform: scale(1.03);
    z-index: 10;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; 
}

.img-large { 
    width: 530px; 
    height: 430px; 
}

.img-medium { 
    width: 430px; 
    height: 330px; 
}
.img-medium img {
    position: absolute; top: 0; left: 0;
}

.img-small { 
    width: 350px; 
    height: 270px; 
} 
.img-small img {
    position: absolute; top: 0; left: 0;
}

.desc-box {
    display: flex;
    flex-direction: column;
}

.box-title {
    width: 100%;
    height: 30px;
    color: var(--p-ribbon-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--p-title-font);
    font-size: 0.9em;
    z-index: 2;
    box-sizing: border-box;
}

.fondo { background-color: #fff; }

#lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
#lightbox.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-header {
    text-align: center;
    margin-bottom: 20px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
#lightbox-project-title {
    font-size: 2em;
    color: #FFC6D4; 
    margin-bottom: 5px;
}
#lightbox-section-title {
    font-size: 1.2em;
    font-weight: bold;
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    max-height: 70vh;
}
#lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    object-fit: contain;
}

.lightbox-btn {
    position: absolute;
    background: none;
    border: none;
    color: white;
    font-size: 3.5em;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10000;
}
.lightbox-btn:hover { color: var(--text-pink); }

#lightbox-prev { left: 5%; top: 50%; transform: translateY(-50%); }
#lightbox-next { right: 5%; top: 50%; transform: translateY(-50%); }
#lightbox-close { top: 20px; right: 30px; font-size: 3em; }

@media (max-width: 600px) {
    .header-main { flex-direction: row; justify-content: space-between; padding: 10px 15px; }
    .logo-text { font-size: 1.5em; }
    .active-tab { padding: 5px 10px; font-size: 0.8em; }
    .project-content { padding: 0 10px; }
    .subsection { max-width: 100%; width: 100%; align-self: center !important; padding: 15px; } 
    .subsection h3 { text-align: center !important; } 
    .pink-ribbon { font-size: 1.2em; }
    
    .project-header { height: 120px; padding: 0 15px; justify-content: center; } 
    .project-header h1 { font-size: 1.5em; padding: 8px 15px; }
    
    .img-large { width: 160px; height: 120px; }
    .img-medium { width: 130px; height: 95px; } 
    .img-small { width: 115px; height: 85px; }

    #lightbox-project-title { font-size: 1.5em; }
    #lightbox-prev { left: 0; font-size: 2.5em; }
    #lightbox-next { right: 0; font-size: 2.5em; }
    #lightbox-close { top: 10px; right: 10px; font-size: 2.5em; }
    #lightbox-img { max-height: 60vh; }
}