/* Fuente Questrial para todo el sitio */
* {
    font-family: 'Questrial', sans-serif;
}

body {
    background-color: #F4F4F4;
    color: #000;
    margin: 0;
    padding: 0;
}

/* Header */
.header-section {
    background-color: #F4F4F4;
    border-bottom: 1px solid #E0E0E0;
    padding: 0;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-image {
    max-height: 50px;
    width: auto;
    height: auto;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 5px 15px 5px 45px;
    border: 1px solid #E0E0E0;
    border-radius: 25px;
    background-color: #FFF;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.header-link {
    color: #000;
    text-decoration: none;
    margin-right: 1rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.header-link:hover {
    color: #666;
    text-decoration: none;
}

.header-btn {
    background-color: #000;
    color: #FFF;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.header-btn:hover {
    background-color: #333;
}

/* Sección Principal */
.main-section {
    padding: 2rem 0;
}

.main-section .container {
    padding-bottom: 2rem;
}

.main-time-display {
    font-size: 15rem;
    font-weight: bold;
    color: #000;
    line-height: 1;
    margin: 1rem 0;
    letter-spacing: -2px;
}

.main-time-display .time-period {
    font-size: 0.2em;
    vertical-align: top;
    margin-left: 0.2em;
    position: relative;
    top: -0.1em;
}

.current-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.sun-info {
    font-size: 1rem;
    color: #000;
    margin: 1rem 0;
}

.sun-info i {
    color: #FFA500;
    margin-right: 0.5rem;
}

.date-display {
    font-size: 1.1rem;
    color: #000;
    margin: 0;
}

/* Toggle de Formato */
.time-format-toggle {
    display: inline-flex;
    background-color: #E0E0E0;
    border-radius: 25px;
    padding: 3px;
}

.format-btn {
    background-color: transparent;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.format-btn.active {
    background-color: #000;
    color: #FFF;
}

.format-btn:hover {
    background-color: #D0D0D0;
}

.format-btn.active:hover {
    background-color: #333;
}

/* Ubicación Actual */
.current-location {
    font-size: 2.5rem;
    font-weight: bold;
    color: #000;
    margin: 0;
}

.motivational-text {
    font-size: 1rem;
    color: #666;
    margin: 0;
    padding-top: 1rem;
}

/* Tarjeta de Clima */
.weather-card {
    background-color: #FFF;
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.weather-icon {
    font-size: 3rem;
    color: #FFA500;
    margin-right: 1.5rem;
}

.weather-info {
    flex: 1;
}

.weather-temp {
    font-size: 2rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 0.5rem;
}

.weather-condition {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.weather-humidity {
    font-size: 0.9rem;
    color: #999;
}

/* Clima en línea */
.weather-card-inline {
    /* background-color: #FFF; */
    border-radius: 15px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

.weather-icon-inline {
    font-size: 2rem;
    color: #FFA500;
    margin-right: 1rem;
}

.weather-info-inline {
    flex: 1;
}

.weather-temp-inline {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.weather-condition-inline {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.1rem;
    line-height: 1.2;
}

.weather-humidity-inline {
    font-size: 0.75rem;
    color: #999;
    line-height: 1.2;
}

/* Botón Agregar Ciudad */
.add-city-btn {
    background-color: transparent;
    border: none;
    color: #000;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.add-city-btn:hover {
    color: #666;
}

.add-city-btn i {
    margin-right: 0.5rem;
}

/* Título de sección */
.section-title {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    padding: 0.5rem 0;
}

/* Grid de Estados */
.state-card {
    background-color: #FFF;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.state-card:hover:not(.active) {
    background-color: #000;
    color: #FFF;
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.state-card:hover:not(.active) .state-utc {
    background-color: #333;
    color: #CCC;
}

.state-card:hover:not(.active) .state-time-info {
    color: #CCC;
}

.state-card.active {
    background-color: #000;
    color: #FFF;
}

.state-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.state-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: inherit;
}

.state-utc {
    font-size: 0.85rem;
    color: #999;
    background-color: #F0F0F0;
    padding: 4px 10px;
    border-radius: 10px;
}

.state-card.active .state-utc {
    background-color: #333;
    color: #CCC;
}

.state-time {
    font-size: 2.5rem;
    font-weight: bold;
    color: inherit;
    margin: 0.5rem 0;
}

.state-time .time-period {
    font-size: 0.25em;
    vertical-align: top;
    margin-left: 0.2em;
    position: relative;
    top: -0.1em;
}

.state-time-info {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.state-card.active .state-time-info {
    color: #CCC;
}

.state-time-info i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.state-time-info .fa-sun {
    color: #FFA500;
}

.state-time-info .fa-moon {
    color: #4A90E2;
}

/* Sugerencias del buscador */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #FFF;
    border: 1px solid #E0E0E0;
    border-radius: 0 0 15px 15px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
}

.search-suggestion-item {
    padding: 12px 45px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #F0F0F0;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background-color: #F4F4F4;
}

.search-suggestion-item.active {
    background-color: #000;
    color: #FFF;
}

/* Responsive */
@media (max-width: 768px) {
    /* Centrar todo el contenido */
    .main-section {
        text-align: center;
    }
    
    .main-time-display {
        font-size: 8rem;
        text-align: center;
        margin: 1rem auto;
    }
    
    .current-label {
        text-align: center;
    }
    
    .current-location {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .sun-info {
        text-align: center;
    }
    
    .date-display {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .time-format-toggle {
        margin: 1rem auto;
        display: inline-flex;
    }
    
    .weather-card-inline {
        margin: 1rem auto;
        text-align: left;
    }
    
    .motivational-text {
        text-align: center;
        padding-top: 1rem;
    }
    
    .header-section .row {
        flex-direction: column;
    }
    
    .header-section .col-md-3,
    .header-section .col-md-6 {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .logo-section {
        justify-content: center;
    }
    
    .search-container {
        margin: 0 auto;
        max-width: 100%;
    }
    
    .state-time {
        font-size: 2rem;
    }
    
    .state-card {
        margin-bottom: 3rem !important;
        margin-top: 1.5rem !important;
    }
    
    #statesGrid {
        margin-top: 2rem;
        padding-bottom: 3rem;
    }
    
    #statesGrid .col-12 {
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .main-section .container {
        padding-bottom: 3rem;
    }
}

@media (max-width: 576px) {
    .main-time-display {
        font-size: 5rem;
        text-align: center;
    }
    
    .current-location {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .date-display {
        text-align: center;
    }
    
    .sun-info {
        text-align: center;
    }
    
    .weather-card-inline {
        text-align: left;
    }
    
    .time-format-toggle {
        margin: 1rem auto;
    }
    
    .state-card {
        margin-bottom: 4rem !important;
        margin-top: 2rem !important;
    }
    
    #statesGrid {
        margin-top: 3rem;
        padding-bottom: 4rem;
    }
    
    #statesGrid .col-12 {
        margin-bottom: 2rem;
        padding: 0 0.75rem;
    }
    
    .main-section .container {
        padding-bottom: 4rem;
    }
}
