/* Base styles */
:root {
    --primary-color: #0055A4; /* Blue - primary color */
    --secondary-color: #C8102E; /* Red - secondary color */
    --accent-color: #FCD116; /* Yellow - accent color (Colombian flag colors) */
    --text-color: #333;
    --light-text: #fff;
    --dark-bg: #222;
    --light-bg: #f5f5f5;
    --border-color: #ddd;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 0 0 2rem 0;
}

.section:first-of-type {
    padding-top: 2.5rem;
}

/* Header and Navigation */
header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--light-text);
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.navbar {
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
    background-color: rgba(0, 0, 0, 0.8);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light-text);
}

.nav-links {
    display: flex;
}

.nav-links a {
    color: var(--light-text);
    margin-left: 2rem;
    padding: 0.5rem 0;
    font-weight: 600;
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--accent-color);
}

.hero {
    flex: 1;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 1.5rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    padding-top: 1.5rem;
}

.hero-text {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.banner-image {
    max-width: 300px;
    border-radius: 10px;
    border: 5px solid var(--light-text);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
    display: block;
}

/* Biography Section */
.bio-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.bio-text p {
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

/* Vision Section */
.vision-content {
    max-width: 800px;
    margin: 0 auto;
}

.vision-list {
    margin: 2rem 0;
}

.vision-list li {
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    background-color: var(--light-bg);
    border-left: 5px solid var(--primary-color);
    border-radius: 5px;
}

.vision-list h3 {
    color: var(--primary-color);
}

/* Achievements Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.achievement-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.achievement-card.major {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #0055A4 0%, #003366 100%);
    color: white;
    padding: 2rem;
    margin-bottom: 2rem;
}

.achievement-card.major h3,
.achievement-card.major p {
    color: white;
}

.achievement-card.major p {
    margin-bottom: 1.2rem;
    font-size: 1.15rem;
    line-height: 1.7;
}

.achievement-card.major p:last-child {
    margin-bottom: 0;
    font-weight: 600;
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #0055A4;
}

.achievement-card.major .achievement-icon {
    color: white;
}

.achievement-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.achievement-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 1.8rem;
}

.achievement-card p:last-child {
    margin-bottom: 0;
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
}

.btn-submit {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 2.5rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--light-text);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.social-link i {
    font-size: 1.2rem;
}

.social-link:hover {
    color: var(--accent-color);
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .nav-links a {
        margin: 0 0.5rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-text {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 2.5rem 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .btn-submit,
    .nav-links a,
    .social-link {
        min-width: 48px;
        min-height: 48px;
        line-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .achievement-card {
        padding: 1.5rem;
    }
    
    .achievement-icon {
        font-size: 2rem;
    }
    
    .achievement-card.major {
        padding: 2rem;
    }
    
    .achievement-card.major p {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 1rem 0;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-between;
        margin-top: 0.5rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
        margin: 0 0.25rem;
        padding: 0.3rem 0;
    }
    
    .hero {
        min-height: 400px;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .banner-image {
        max-width: 250px;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    h2 {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .bio-text p, 
    .vision-content p {
        font-size: 1rem;
        text-align: left;
    }
    
    .vision-list li, 
    .achievement-card {
        padding: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .vision-list h3, 
    .achievement-card h3 {
        font-size: 1.3rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.7rem;
        font-size: 1rem;
    }
    
    .btn-submit {
        width: 100%;
        padding: 0.8rem;
    }
    
    .social-links {
        width: 100%;
        justify-content: center;
    }
    
    .achievement-card.major {
        padding: 1.5rem;
    }
    
    .achievement-card.major p {
        font-size: 1rem;
    }
}

/* iPhone-specific optimizations */
@media (max-width: 414px) {
    .navbar .container {
        padding: 0 15px;
    }
    
    .hero {
        padding-top: 4rem;
    }
    
    .hero h1 {
        font-size: 2rem;
        letter-spacing: 1px;
        margin-bottom: 1.8rem;
    }
    
    .hero-text {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 2rem;
        padding: 0 10px;
    }
    
    .banner-image {
        max-width: 220px;
        border-width: 3px;
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    }
    
    .nav-links a {
        font-size: 0.9rem;
        font-weight: 700;
        padding: 0.5rem 0.3rem;
    }
    
    .container {
        width: 92%;
        padding: 0 12px;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .vision-list li, 
    .achievement-card {
        padding: 1.2rem;
        margin-bottom: 1.2rem;
        border-radius: 8px;
    }
    
    h2 {
        font-size: 1.7rem;
        margin-bottom: 1.5rem;
    }
    
    .bio-text p {
        margin-bottom: 1.2rem;
        line-height: 1.7;
    }
    
    .social-link {
        padding: 0.6rem;
        font-size: 1rem;
        margin: 0 0.5rem;
    }
    
    .form-group {
        margin-bottom: 1.8rem;
    }
    
    .form-group label {
        margin-bottom: 0.6rem;
        font-size: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.9rem;
        border-radius: 8px;
        font-size: 16px;
        border: 1px solid #ccc;
    }
    
    .btn-submit {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
        border-radius: 8px;
        margin-top: 0.5rem;
    }
    
    footer {
        padding: 2.5rem 0;
    }
    
    .footer-info p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .navbar {
        background-color: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .nav-links {
        gap: 5px;
    }
}

/* Mobile touch improvements */
@media (hover: none) {
    /* Improve tap targets for mobile devices */
    .nav-links a, 
    .btn-submit,
    .social-link {
        transition: opacity 0.2s ease;
    }
    
    .nav-links a:active, 
    .btn-submit:active,
    .social-link:active {
        opacity: 0.7;
    }
    
    /* Avoid sticky hover effects on mobile */
    .achievement-card:hover {
        transform: none;
    }
    
    /* Increase target sizes for touch */
    .social-link {
        padding: 0.8rem;
        margin: 0 0.3rem;
    }
    
    /* Fix iOS input styling */
    input, 
    textarea {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border-radius: 4px;
    }
    
    /* Fix iOS button styling */
    .btn-submit {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        cursor: pointer;
    }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Modified to fix the scrolling while maintaining proper behavior */
    html, body {
        width: 100%;
        height: 100%;
        overflow-x: hidden;
        overscroll-behavior-y: none;
        position: relative; /* Changed from fixed to allow normal scrolling */
    }
    
    /* Prevent zooming when focusing on inputs */
    input[type="text"],
    input[type="email"],
    textarea {
        font-size: 16px;
    }
    
    /* Fix iOS smooth scrolling */
    .nav-links a {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Fix iOS button appearance */
    button,
    .btn-submit {
        -webkit-tap-highlight-color: transparent;
    }
}

/* iPhone specific media query - handle iPhone notch */
@media only screen 
and (device-width: 375px) 
and (device-height: 812px) 
and (-webkit-device-pixel-ratio: 3),
only screen 
and (device-width: 390px) 
and (device-height: 844px) 
and (-webkit-device-pixel-ratio: 3),
only screen 
and (device-width: 428px) 
and (device-height: 926px) 
and (-webkit-device-pixel-ratio: 3) {
    .navbar {
        padding-top: calc(1.5rem + env(safe-area-inset-top));
    }
    
    footer {
        padding-bottom: calc(3rem + env(safe-area-inset-bottom));
    }
}

html {
    scroll-behavior: smooth;
}

.thank-you-message {
    text-align: center;
    padding: 2rem 1rem;
    animation: fadeIn 0.5s ease-in-out;
}

.thank-you-message h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.thank-you-message p {
    margin-bottom: 1.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* iOS device specific styles */
.ios-device .btn-submit,
.ios-device .form-group input,
.ios-device .form-group textarea {
    border-radius: 8px;
}

.ios-device .nav-links a {
    padding: 0.7rem 0.5rem;
}

.contact-info {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-info p {
    margin-bottom: 1.5rem;
}

.email-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.email-button:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}

.email-button:active {
    transform: translateY(0);
}

.email-button i {
    font-size: 1.2rem;
}

#contacto.section {
    padding-top: 1.5rem;
}

/* Weather widget */
.weather-widget {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06);
    max-width: 700px;
    margin: 1rem auto 0 auto;
}

.weather-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.weather-main {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
}

.weather-temp {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.weather-desc {
    font-size: 1.1rem;
}

.weather-extra {
    display: flex;
    gap: 1rem;
}

.weather-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #555;
}

.weather-updated {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 576px) {
    .weather-temp {
        font-size: 2rem;
    }
    .weather-extra {
        width: 100%;
        justify-content: space-between;
    }
}