
/* Basic styles for the calendar */
#calendar {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    min-height: 400px; /* Ensure the calendar has a minimum height */
}

.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal .close:hover,
.modal .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    margin: 0;
}

header {
    background: #333;
    color: #fff;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

nav {
    grid-column: 2;
    justify-self: center;
}

.user-area {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
}

#user-profile {
    display: flex;
    align-items: center;
    white-space: nowrap; 
}

#user-profile p {
    margin: 0;
    color: #fff;
}

#user-profile img {
    width: 30px; 
    height: 30px;
    border-radius: 50%; 
    margin-left: 10px;
}

.user-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #333;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    padding: 10px 0;
}

.user-dropdown:hover .dropdown-content {
    display: block;
}

.signout-button {
    background-color: transparent;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: left;
    width: 100%;
    font-size: 14px;
    cursor: pointer;
}

.signout-button:hover {
    background-color: #555;
}

nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    white-space: nowrap; 
}

nav ul li {
    display: inline-block;
    margin-right: 15px;
    vertical-align: middle;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

nav a.active {
    border-bottom: 2px solid #fff;
}

.hero {
    position: relative;
    height: 30vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 15px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); 
}

.hero .hero-text h1 {
    margin: 0;
    font-size: 3rem; 
    color: white; 
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    position: relative; 
}


#antecedentes {
    padding: 20px; 
}

.section-title {
    text-align: center;
    margin-top: 10px; 
    margin-bottom: 10px; 
    position: relative;
}

.section-title h2 {
    font-size: 2rem;
    color: #333;
    display: inline-block;
    background-color: #fff;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid #ccc;
}

#dynamic-intro-text p {
    margin-bottom: 0;
}

.section-divider {
    border: 0;
    height: 1px;
    background-color: #eee;
    margin: 20px 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #fff;
}

.card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: 0; 
    transition: transform 0.3s ease;
}

.card:hover img {
    transform: scale(1.05); 
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 60%);
    z-index: 1;
    transition: background 0.3s ease;
}

.card:hover::before {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.1) 60%);
}

.card h3, .card p {
    position: relative;
    z-index: 2;
    margin: 0;
    color: #fff !important; 
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.card h3 {
    font-size: 1.6rem;
    margin-bottom: 5px;
}

.card p {
    font-size: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
    opacity: 0;
}

.card:hover p {
    max-height: 100px;
    opacity: 1;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.content {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px 40px 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 40px;
    margin: 20px auto;
    max-width: 900px;
}

.content h1, .content h2, .content h3 {
    color: #333;
}

.text-container {
    text-align: justify;
}

.text-container::after {
    content: "";
    display: inline-block;
    width: 100%;
}

.post-content ul {
    padding-left: 20px;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.9em;
    color: #666;
    border-top: 1px solid #ccc;
}


.photo-gallery {
    margin-top: 30px;
}

.month-section {
    margin-bottom: 40px;
}

.month-title {
    font-size: 1.5em; 
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 0;
    border-bottom: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.photo-date {
    position: absolute;
    bottom: 8px;
    left: 8px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}


.lightbox {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain; 
    display: block;
    margin: auto;
    border-radius: 8px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-lightbox:hover {
    color: #bbb;
}


.blog-post {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-width: 0 0 1px 0;
    border-style: solid;
    border-image: linear-gradient(to right, transparent, #e0e0e0, transparent) 1;
}

.blog-post:last-child {
    border-image: none;
    margin-bottom: 0;
    padding-bottom: 0;
}


.progress-bar-container {
    height: 5px;
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 5px;
    margin: 0 0 50px;
    overflow: hidden; 
}

.progress-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #e4c45c, #d9a442, #e4c45c);
    animation: loading-shimmer 2s infinite;
}

@keyframes loading-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}


.call-log {
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.month-container {
    margin-bottom: 40px;
}

.month-container h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #333;
}

.calendar-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-grid li {
    display: flex;
    justify-content: center;
    align-items: center;
}

.calendar-grid a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50px;
    text-decoration: none;
    color: #555;
    background-color: #f0f0f0;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
    position: relative;
}

.weekday-header {
    font-weight: bold;
    color: #777;
    background-color: transparent;
    font-size: 0.9em;
}

.calendar-grid a:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

a.today {
    background-color: #ffc400;
    color: #333;
    border-color: transparent;
    font-weight: bold;
}

a.with-call {
    background-color: #e8f5e9;
    color: #2e7d32;
}

a.with-call:hover {
    cursor: pointer;
}

a.no-call {
    background-color: #ffebee;
    color: #c62828;
    background-image: linear-gradient(to top right, transparent 49.5%, rgba(198, 40, 40, 0.3) 49.5%, rgba(198, 40, 40, 0.3) 50.5%, transparent 50.5%);
}

a.no-call:not([title]):hover {
    transform: none;
    box-shadow: none;
    cursor: default;
}

a.country-chile {
    border: 3px solid #0033a0;
}

a.country-chile:hover {
    box-shadow: 0 0 0 3px #d52b1e;
}

a.country-espana {
    border: 3px solid #c60b1e;
}

a.country-espana:hover {
    box-shadow: 0 0 0 3px #ffc400;
}

.video-lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    align-items: center;
    justify-content: center;
}

.video-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 960px; /* Increased max-width */
    background: #000; /* Solid black background */
    padding: 10px;
    border-radius: 10px;
}

.close-video-lightbox {
    position: absolute;
    top: -35px; /* Adjusted position */
    right: -15px; /* Adjusted position */
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0; /* Make it transparent by default */
    transition: opacity 0.4s ease-in-out; /* Add a smooth transition */
}

.video-container.loaded {
    opacity: 1; /* Make it visible when loaded */
}

.video-container iframe, #player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#video-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10; /* Below custom controls (z-index: 20) but above video */
    background-color: rgba(0, 0, 0, 0.001); /* Catches clicks */
}

.publication-date {
    display: inline-block;
    padding: 5px 15px;
    background-color: #333;
    color: #fff;
    border-radius: 20px;
    font-size: 0.8em;
    margin-bottom: 15px;
}

.blog-post-image {
    float: left;
    margin-right: 25px;
    margin-bottom: 15px;
    max-width: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.blog-post-content {
    overflow: hidden;
}

.calendar-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 65%; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); 
    margin-bottom: 40px;
}


.calendar-container iframe {
    position: absolute;
    top: -1px; 
    left: -1px; 
    width: calc(100% + 2px); 
    height: calc(100% + 72px); 
    border: none;
}

.hero-secondary {
    position: relative;
    padding: 80px 20px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    background-size: cover;
    background-position: center;
    color: white;
    border-radius: 15px;
    overflow: hidden;
}

.hero-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-secondary h1 {
    font-size: 3rem;
    color: #fff;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 2;
}

.btn-back {
    position: absolute;
    top: 20px;
    left: 20px;
    text-decoration: none;
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s;
    z-index: 2;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-back:hover {
    background-color: rgba(0, 0, 0, 0.4);
}



.hero-home {
    background-image: url('images/06-Home/06-HomeBanner.jpg');
}

.hero-videollamadas {
    background-image: url('images/09-Videollamadas/00-VideollamadasBanner.jpg');
}
.hero-fotografias {
    background-image: url('images/10-Fotografias/00-FotografiasBanner.jpg');
}
.hero-calendario {
    background-image: url('images/11-Calendario/00-CalendarioBanner.jpg');
}
.hero-blog {
    background-image: url('images/12-AboutMe/00-SobreMiBanner.jpg');
}
#inicio-content p, #inicio-content strong,
#historia-content p, #historia-content strong {
    font-weight: normal !important;
}


@media (max-width: 1200px) {
    .nav-container, .content, .timeline-section {
        max-width: 960px;
    }
    .hero .hero-text h1, .hero-secondary h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .nav-container, .content, .timeline-section {
        max-width: 720px;
    }
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .blog-post-image {
        float: none;
        display: block;
        margin: 0 auto 20px;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .nav-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    nav {
        width: 100%;
    }
    nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        white-space: normal;
        padding: 0;
    }
    nav ul li {
        margin-bottom: 10px;
        margin-right: 0;
    }
    .user-area {
        margin-bottom: 15px;
    }
    #user-profile {
        margin-top: 10px;
        justify-content: center;
    }
    .hero .hero-text h1, .hero-secondary h1 {
        font-size: 2rem;
    }
    .content {
        padding: 20px;
    }
    .calendar-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 5px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

/* Custom video controls */
.custom-controls {
    position: absolute;
    bottom: 10px; /* Adjusted position */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 20; /* High z-index */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-lightbox-content:hover .custom-controls, .custom-controls.active {
    opacity: 1;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.progress-bar-custom-container {
    width: 300px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.progress-bar-custom {
    height: 100%;
    background-color: #ffc400;
    width: 0%;
    border-radius: 4px;
}

.time-display {
    color: white;
    font-size: 14px;
    min-width: 80px;
    text-align: center;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #ffc400;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: #ffc400;
    border-radius: 50%;
    cursor: pointer;
}
