/* components.css - Styles for reusable UI components */

/* =================================================================================
   --- PROJECT ITEMS
   ================================================================================= */

.project-item {
    transition: all 0.3s ease;
}

.project-item:hover {
    transform: translateY(-2px);
}

/* =================================================================================
   --- EXPERIENCE ITEMS
   ================================================================================= */

.experience-item {
    transition: all 0.3s ease;
}

.experience-item:hover {
    transform: translateY(-2px);
}

/* =================================================================================
   --- EDUCATION ITEMS
   ================================================================================= */

.education-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.education-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* =================================================================================
   --- CERTIFICATION LIST
   ================================================================================= */

.certification-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.certification-item {
    padding: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--secondary-text-color);
}

/* =================================================================================
   --- PROFILE IMAGE
   ================================================================================= */

.profile-image {
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* =================================================================================
   --- SOCIAL LINKS
   ================================================================================= */

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--card-bg-color);
    border: 1px solid var(--card-border-color);
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: scale(1.1);
    background-color: var(--primary-color);
    color: white;
}

/* =================================================================================
   --- CALENDLY BUTTON
   ================================================================================= */

.calendly-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
}

.calendly-btn:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* =================================================================================
   --- DOWNLOAD BUTTON
   ================================================================================= */

.download-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background-color: var(--primary-color);
    opacity: 0.9;
    transform: translateY(-1px);
}

.download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* =================================================================================
   --- SECTION HEADERS
   ================================================================================= */

.section-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--primary-color);
}

/* =================================================================================
   --- CARD COMPONENTS
   ================================================================================= */

.card {
    background: var(--card-bg-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* =================================================================================
   --- RESPONSIVE COMPONENTS
   ================================================================================= */

/* Desktop layout adjustments */
@media (min-width: 768px) {
    .md\:flex {
        display: flex !important;
    }
    
    .lg\:flex {
        display: flex !important;
    }
    
    .md\:hidden {
        display: none !important;
    }
    
    .lg\:hidden {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .profile-image {
        width: 10rem;
        height: 10rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .card {
        padding: 1rem;
    }
    
    .section-header {
        font-size: 1.25rem;
    }
}

/* =================================================================================
   GLASSMORPHISM & CARD EFFECT
   ================================================================================= */

.glass-effect {
    background: var(--card-bg-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    border-radius: 0.75rem;
}

.timeline-item.glass-effect:hover,
.project-item:hover,
.glass-effect.interactive:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* =================================================================================
   INTERACTIVE ELEMENTS (ICONS & LINKS)
   ================================================================================= */

.icon-link {
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    color: var(--secondary-text-color);
}

.icon-link:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.x-logo {
    width: 28px;
    height: 28px;
    fill: var(--secondary-text-color);
    transition: fill 0.3s ease;
}

.icon-link:hover .x-logo {
    fill: var(--primary-color);
}

/* =================================================================================
   TAGS SYSTEM
   ================================================================================= */

.tag {
    background-color: #374151;
    color: #d1d5db;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

html.light-mode .tag {
    background-color: #e5e7eb;
    color: #374151;
}

.tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tag.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

html.light-mode .tag.active {
    color: #1f2937;
}

/* =================================================================================
   CTA BUTTONS (Call to Action)
   ================================================================================= */

.main-cta {
    background-color: var(--primary-color) !important;
    transition: background-color 0.3s, transform 0.2s;
}

.main-cta:hover {
    background-color: #0284c7 !important; /* sky-600 */
    transform: translateY(-2px);
}

.secondary-cta {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: background-color 0.3s, color 0.3s;
}

.secondary-cta:hover {
    background-color: var(--primary-color);
    color: white;
}

/* =================================================================================
   TYPING EFFECT
   ================================================================================= */

.typing-cursor {
    display: inline-block;
    width: 10px;
    height: 1.5rem;
    background-color: var(--primary-color);
    animation: blink 1s infinite;
    margin-left: 4px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* =================================================================================
   BUTTONS (Main site controls)
   ================================================================================= */

.top-controls {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    background-color: var(--card-bg-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border-color);
    color: var(--text-color);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.control-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: transparent;
}

/* =================================================================================
   MODAL COMPONENT
   ================================================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    padding: 2.5rem;
    border-radius: 1rem;
    max-width: 90%;
    width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-text-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.modal-close-btn:hover {
    color: var(--text-color);
}

/* =================================================================================
   MOBILE NAVIGATION MENU
   ================================================================================= */

/* Override glass-effect for mobile navigation to make it less transparent */
#mobile-nav.glass-effect, 
#mobile-nav-index.glass-effect,
#mobile-nav,
#mobile-nav-index {
    background: rgba(31, 41, 55, 0.95) !important; /* Much less transparent dark */
    background-color: rgba(31, 41, 55, 0.95) !important; /* Override consulting.css var */
    backdrop-filter: blur(15px) !important; /* More blur for better readability */
}

html.light-mode #mobile-nav.glass-effect, 
html.light-mode #mobile-nav-index.glass-effect,
html.light-mode #mobile-nav, 
html.light-mode #mobile-nav-index,
html.light #mobile-nav.glass-effect,
html.light #mobile-nav-index.glass-effect,
html.light #mobile-nav,
html.light #mobile-nav-index {
    background: rgba(255, 255, 255, 0.95) !important; /* Much less transparent light */
    background-color: rgba(255, 255, 255, 0.95) !important; /* Override consulting.css var */
}

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

@media (max-width: 768px) {
    /* Ensure header controls (language and theme) are side by side in mobile */
    header .flex.items-center.space-x-3 {
        display: flex;
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
    }
}

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

@media (max-width: 640px) {
    .modal-content {
        padding: 1.5rem;
        max-width: 95%;
        max-height: 95vh;
    }
}

/* =================================================================================
   LIGHT MODE MODAL IMPROVEMENTS - BETTER READABILITY (FROM CONSULTING.HTML)
   ================================================================================= */

/* Modal background improvements for light mode */
html.light-mode .modal-content.glass-effect,
html.light .modal-content.glass-effect {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(209, 213, 219, 0.8) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Better text contrast in light mode modals */
html.light-mode .modal-content h4,
html.light-mode .modal-content h5,
html.light-mode .modal-content h6,
html.light .modal-content h4,
html.light .modal-content h5,
html.light .modal-content h6 {
    color: #1f2937 !important; /* gray-800 for better contrast */
}

/* Service-specific color improvements for light mode */
html.light-mode .modal-content .text-emerald-400,
html.light .modal-content .text-emerald-400 {
    color: #047857 !important; /* emerald-700 for better contrast */
}

html.light-mode .modal-content .text-green-400,
html.light .modal-content .text-green-400 {
    color: #166534 !important; /* green-800 for better contrast */
}

html.light-mode .modal-content .text-sky-400,
html.light .modal-content .text-sky-400 {
    color: #0369a1 !important; /* sky-700 for better contrast */
}

html.light-mode .modal-content .text-cyan-400,
html.light .modal-content .text-cyan-400 {
    color: #0891b2 !important; /* cyan-600 for better contrast */
}

html.light-mode .modal-content .text-purple-400,
html.light .modal-content .text-purple-400 {
    color: #7c3aed !important; /* purple-600 for better contrast */
}

html.light-mode .modal-content .text-yellow-400,
html.light .modal-content .text-yellow-400 {
    color: #d97706 !important; /* amber-600 for better contrast */
}

/* Check icons and success indicators */
html.light-mode .fa-check-circle.text-green-400,
html.light .fa-check-circle.text-green-400 {
    color: #16a34a !important; /* green-600 for better visibility */
}

/* Step number circles in light mode */
html.light-mode .modal-content .bg-sky-500\/20,
html.light .modal-content .bg-sky-500\/20 {
    background-color: rgba(14, 165, 233, 0.15) !important;
    color: #0369a1 !important; /* sky-700 */
}

html.light-mode .modal-content .bg-cyan-500\/20,
html.light .modal-content .bg-cyan-500\/20 {
    background-color: rgba(6, 182, 212, 0.15) !important;
    color: #0891b2 !important; /* cyan-600 */
}

html.light-mode .modal-content .bg-emerald-500\/20,
html.light .modal-content .bg-emerald-500\/20 {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #047857 !important; /* emerald-700 */
}

html.light-mode .modal-content .bg-purple-500\/20,
html.light .modal-content .bg-purple-500\/20 {
    background-color: rgba(168, 85, 247, 0.15) !important;
    color: #7c3aed !important; /* purple-600 */
}

/* Success case boxes in light mode */
html.light-mode .modal-content .bg-gray-800\/50,
html.light .modal-content .bg-gray-800\/50 {
    background-color: rgba(243, 244, 246, 0.8) !important; /* gray-100 */
    border: 1px solid rgba(209, 213, 219, 0.6) !important;
}

/* Secondary text improvements */
html.light-mode .modal-content .text-secondary,
html.light .modal-content .text-secondary {
    color: #4b5563 !important; /* gray-600 for better readability */
}

/* WhatsApp button improvements for light mode */
html.light-mode .bg-green-500,
html.light .bg-green-500 {
    background-color: #16a34a !important; /* green-600 for better contrast */
}

html.light-mode .bg-green-500:hover,
html.light-mode .hover\:bg-green-600:hover,
html.light .bg-green-500:hover,
html.light .hover\:bg-green-600:hover {
    background-color: #15803d !important; /* green-700 */
}

/* Modal close button improvements */
html.light-mode .modal-close-btn,
html.light .modal-close-btn {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #374151 !important; /* gray-700 */
}

html.light-mode .modal-close-btn:hover,
html.light .modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.2) !important;
    color: #111827 !important; /* gray-900 */
}

/* Feature icons in modals */
html.light-mode .modal-content .feature-icon,
html.light .modal-content .feature-icon {
    color: #0369a1 !important; /* sky-700 for better contrast */
}

/* Ensure all modal text has proper contrast */
html.light-mode .modal-content strong,
html.light .modal-content strong {
    color: #111827 !important; /* gray-900 for maximum contrast */
}

/* Glass effect improvements for light mode sections */
html.light-mode .glass-effect,
html.light .glass-effect {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(209, 213, 219, 0.8) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

/* Better contrast for project and experience items */
html.light-mode .project-item,
html.light-mode .experience-item,
html.light-mode .education-item,
html.light .project-item,
html.light .experience-item,
html.light .education-item {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(209, 213, 219, 0.8) !important;
}

/* Certification items improvements */
html.light-mode .certification-item,
html.light .certification-item {
    background-color: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(209, 213, 219, 0.6) !important;
}

/* Card hover effects improvements */
html.light-mode .card:hover .glass-effect,
html.light .card:hover .glass-effect {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Icon links improvements */
html.light-mode .icon-link,
html.light .icon-link {
    color: #0369a1 !important; /* sky-700 for better contrast */
}

html.light-mode .icon-link:hover,
html.light .icon-link:hover {
    color: #0284c7 !important; /* sky-600 */
}

/* Social link improvements */
html.light-mode .social-link,
html.light .social-link {
    color: #0369a1 !important; /* sky-700 for better contrast */
}

html.light-mode .social-link:hover,
html.light .social-link:hover {
    color: #0284c7 !important; /* sky-600 */
}

/* Download button improvements */
html.light-mode .download-btn,
html.light .download-btn {
    background-color: #0369a1 !important; /* sky-700 for better contrast */
    border-color: #0369a1 !important;
}

html.light-mode .download-btn:hover,
html.light .download-btn:hover {
    background-color: #0284c7 !important; /* sky-600 */
    border-color: #0284c7 !important;
}

/* =================================================================================
   --- LOGO COMPONENTS (for dynamic logos in index.html)
   ================================================================================= */

.logo-container {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
    position: relative;
}

.logo-container:hover {
    opacity: 0.8;
}

.logo-img {
    height: 4.5rem; /* Logo grande - 72px */
    width: auto;
    object-fit: contain; /* Logos ya vienen recortados */
    object-position: left center; /* Alinear contenido a la izquierda */
    transition: all 0.3s ease;
}

/* Logo visibility based on theme */
.logo-dark {
    display: block;
}

.logo-light {
    display: none;
}

/* Show appropriate logo in light mode */
html.light-mode .logo-dark {
    display: none;
}

html.light-mode .logo-light {
    display: block;
}

/* ======== HEADER COMPACTNESS ======== */

/* Make header more compact by reducing nav padding */
header nav {
    padding-top: 0.5rem; /* Compacto pero que acomode el logo grande - 8px */
    padding-bottom: 0.5rem;
}

/* ======== MOBILE RESPONSIVE ADJUSTMENTS FOR LOGOS ======== */

@media (max-width: 768px) {
    /* Logo container styling and spacing for mobile */
    header nav > a.logo-container {
        margin-right: 1rem; /* Force minimum 16px space */
        flex-shrink: 1; /* Allow logo to shrink if needed */
    }
    
    /* Logo image responsive sizing */
    .logo-img {
        height: clamp(3rem, 8vw, 4rem) !important; /* Logo grande en móviles - 48px-64px */
        width: auto !important;
        object-fit: contain !important; /* Logos recortados */
    }
    
    /* Reduce controls container spacing */
    header nav > div.flex.items-center.space-x-3 {
        gap: 0.5rem; /* 8px instead of 12px (space-x-3) */
        margin-left: auto; /* Ensure it stays on the right */
    }
    
    /* Tighter nav container on mobile */
    header nav {
        padding: 0.375rem 0.75rem; /* Compacto pero que acomode logo grande en móviles */
        gap: 0.5rem; /* Add gap between main elements */
    }
    
    /* Smaller control buttons for more space */
    .control-btn {
        padding: 0.375rem 0.5rem; /* Reduce from default padding */
        font-size: 0.75rem; /* Make text smaller */
    }
    
    /* Language controls container - make it more compact */
    header nav .flex.bg-gray-700\/50 {
        padding: 0.125rem; /* Tighter internal padding */
    }
}

/* Extra small mobile devices - even more aggressive */
@media (max-width: 375px) {
    header nav > a.logo-container {
        margin-right: 0.75rem; /* Still maintain some space */
    }
    
    .logo-img {
        height: clamp(2.5rem, 7vw, 3rem) !important; /* Logo grande incluso en móviles pequeños - 40px-48px */
        width: auto !important;
        object-fit: contain !important; /* Logos recortados */
    }
    
    .control-btn {
        padding: 0.25rem 0.375rem; /* Very compact */
        font-size: 0.6875rem; /* 11px */
    }
} 