@charset "utf-8";

/* Global reset and body styles */
* {
    border: 0;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    color: #333; /* Adjusting to a darker shade from the second style */
    font-family: Arial, sans-serif; /* Changed font to match the second style */
    font-size: 12pt;
    letter-spacing: 0.05em;
    line-height: 150%;
    margin: 0.25em auto;
    height: 1440px; /* Added from the second style */
}

/* Layout styles */
article, footer, header, nav, section {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 100px auto; /* Increased margin for better spacing */
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Typography styles */
h1 {
    font-size: 0.3em;
	padding: 20px;
}

.logo {
    height: 41px;
    width: 221px;
    padding-left: 5px;
}

.logo a:hover {
    background-color: #FFF;
    text-align: left;
    text-decoration: none;
}

h2, h3, h4 {
    color: #455868;
    font-family: Arial, sans-serif;
    margin: 0.2em auto;
    text-align: center;
}

.titulo-principal {
    font-family: Arial, sans-serif;
    font-size: 3rem;
    color: #455868;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px #ccc;
}

.subtitulo {
    font-size: 1.75em;
    padding-bottom: 0.25em;
    padding-left: 7px;
}

.ptexto, .pimagen {
    margin: 0.2em auto;
}

.ptitulo {
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 11pt;
    margin: 0.3em auto;
    padding: 0.5em;
    text-align: left;
}

/* Link styles */
a {
    color: #367dc5;
    text-decoration: none;
}

a:hover {
    background-color: #8c99a4;
    color: #fff;
}

/* Nav styles */
nav {
    background: #455868;
    border-bottom: 2px solid #283744;
    font-family: Arial, sans-serif;
    font-size: 11pt;
    font-weight: bold;
    height: 40px;
    position: relative;
    width: 100%;
}

nav ul {
    display: flex;
    justify-content: center; /* Centra horizontalmente */
    align-items: center;
    height: 40px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    list-style: none;
}

nav li {
    margin: 0 10px; /* Espacio horizontal entre elementos */
}

nav li a {
    border-right: 1px solid #576979;
    box-sizing: border-box;
}

nav li:last-child a {
    border-right: 0;
}

nav a {
    color: #fff;
    display: inline-block;
    line-height: 40px;
    text-align: center;
    text-decoration: none;
    text-shadow: 1px 1px 0px #283744;
    width: 150px;
}

nav a:hover,
nav a:active {
    background-color: #8c99a4;
}

/* Media Queries */
@media (min-width: 1081px) {
    nav {
        border-radius: 0.5em;
    }
}

@media (max-width: 900px) {
    nav {
        height: auto;
    }

    nav ul {
        display: block;
        height: auto;
        width: 100%;
    }

    nav li {
        float: left;
        position: relative;
        width: 50%;
    }

    nav li a {
        border-bottom: 1px solid #576979;
        border-right: 1px solid #576979;
        text-align: left;
        text-indent: 25px;
        width: 100%;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 10pt; /* Adjust font size for smaller screens */
    }

    footer {
        line-height: 80%;
    }

    .ptitulo {
        font-size: 10pt; /* Adjust subtitle font size */
    }
}

@media (max-width: 320px) {
    nav li {
        display: block;
        float: none;
        width: 100%;
    }

    footer {
        line-height: 50%;
        min-height: 70px;
    }
}

/* Specific component styles */
.grid-cuentos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    padding: 20px;
}

.cuadro-cuento {
    background: white;
    border-radius: 20px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 10px;
}

.cuadro-cuento:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.cuadro-cuento img {
    width: 70%;
    height: auto;
    border-radius: 15px;
}

.cuadro-cuento p {
    margin-top: 10px;
    font-weight: bold;
    color: #4b0082;
}

.back {
    background: white;
    border-radius: 20px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 10px;
    width: 50px;
    height: 50px;
    margin: 100px auto;
}

.back img {
    width: 50px;
    height: 50px;
}

/* Additional styles incorporated from the first stylesheet */
section#contenido {
    background: #FFF;
    margin: 0.5em auto;
    max-width: 1000px;
    text-align: center;
}

section#final {
    background: #455868;
    border-bottom: 2px solid #283744;
    border-radius: 0.5em;
    clear: both;
    color: #FFF;
    margin: 0.25em auto;
    min-height: 150px;
    padding: 0.25em;

    /* Centrado con Flexbox */
    display: flex;
    justify-content: center; /* Centrado horizontal */
    align-items: center;     /* Centrado vertical */
    text-align: center;
}

#footer {
	font-weight: bold;
	font-size: 11pt;
    padding: 10px;
}

#footer a {
    text-decoration: none;
    color: #4081d6;
}


footer {
    clear: both;
    min-height: 50px;
    padding-bottom: 15px;
}

.footer-col {
    display: inline-block;
    font-family: 'Montserrat', serif;
    font-size: 10pt;
    min-width: 100px;
    min-height: 60px;
    overflow: hidden;
    padding: 10px 0 0 10px;
    text-align: left;
}

.footer-col a {
    color: #fff;
    text-decoration: none;
}

.footer-col a:hover {
    background-color: #8c99a4;
    color: #fff;
}

.footer-col h3 {
    color: #FFF;
    margin: 0.2em auto;
}

section#pie1, section#subir {
    display: inline-block;
    text-align: center;
}

#barraaceptacion {
    background-color: rgba(0, 0, 0, 0.5);
    bottom: 0;
    clear: both;
    color: #FFF;
    display: none;
    left: 0;
    min-height: 20px;
    padding-bottom: 15px;
    position: fixed;
    right: 0;
    text-align: center;
    width: 100%;
    z-index: 99999;
}

.inner {
    font-family: Arial, sans-serif;
    font-size: 10pt;
    letter-spacing: 0.05em;
    padding-left: 5px;
    position: absolute;
    top: 20%;
    width: 100%;
}

.inner a.ok {
    color: #000;
    padding: 4px;
    text-decoration: none;
}

.inner a.info {
    color: #FFF;
    padding-left: 5px;
    text-decoration: none;
}

/* Clearfix */
.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}

.clearfix:after {
    clear: both;
}

header, nav, section#final, section#pie2, footer {
	max-width:1000px;
	margin:0.5em auto;
	padding:0;
}