/* Travel Tools by Country - Main Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.travel-tools-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tools-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tools-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="rgba(255,255,255,0.1)" d="M30,30 Q50,10 70,30 T90,50 Q70,70 50,90 T30,70 Q10,50 30,30Z"/></svg>');
    opacity: 0.3;
}

.tools-header h1 {
    font-size: 3em;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tools-header p {
    font-size: 1.2em;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.tools-main {
    padding: 40px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    background: #f8fafc;
}

.tool-category {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border-left: 6px solid #667eea;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.tool-category h2 {
    color: #2d3748;
    margin-bottom: 25px;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.tool-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tool-item:hover {
    transform: translateX(8px);
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    background: white;
}

.tool-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.tool-content {
    flex: 1;
}

.tool-content h3 {
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1.2em;
    font-weight: 600;
}

.tool-content p {
    color: #718096;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 15px;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.tool-link:hover {
    background: linear-gradient(135deg, #764ba2, #f093fb);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* Country Selector */
.country-selector {
    grid-column: 1 / -1;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-top: 20px;
}

.country-selector h2 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 2em;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: center;
    justify-content: center;
}

.country-selector > p {
    color: #718096;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.country-search {
    display: flex;
    max-width: 500px;
    margin: 0 auto 40px auto;
}

#country-search-input {
    flex: 1;
    padding: 15px 25px;
    border: 3px solid #e2e8f0;
    border-radius: 10px 0 0 10px;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

#country-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

#country-search-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

#country-search-btn:hover {
    background: linear-gradient(135deg, #764ba2, #f093fb);
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.country-item {
    background: white;
    padding: 25px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid #e2e8f0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.country-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.country-item:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.country-item:hover::before {
    transform: scaleX(1);
}

.country-flag {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.country-item span {
    display: block;
    font-weight: 700;
    color: #2d3748;
    font-size: 1.2em;
    margin-bottom: 8px;
}

.country-info {
    color: #718096;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Modal Styles */
.country-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 2em;
    margin: 0;
}

.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 40px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.modal-section {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.modal-section h4 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-detail {
    color: #4a5568;
    line-height: 1.6;
    font-size: 1.1em;
}

.modal-footer {
    padding: 25px 40px;
    background: #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.modal-footer button {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-print {
    background: #38b2ac;
    color: white;
}

.modal-print:hover {
    background: #319795;
    transform: translateY(-2px);
}

.modal-save {
    background: #667eea;
    color: white;
}

.modal-save:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

/* Footer */
.tools-footer {
    text-align: center;
    padding: 30px;
    background: #f1f5f9;
    color: #718096;
    font-size: 1em;
    border-top: 2px solid #e2e8f0;
}

.tools-footer p {
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tools-main {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        padding: 30px 20px;
    }
    
    .country-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .travel-tools-container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .tools-header {
        padding: 30px 20px;
    }
    
    .tools-header h1 {
        font-size: 2.2em;
    }
    
    .tools-main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 15px;
    }
    
    .country-selector {
        padding: 25px 20px;
    }
    
    .country-selector h2 {
        font-size: 1.6em;
    }
    
    .country-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .modal-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
        padding: 20px;
    }
    
    .modal-footer button {
        width: 100%;
        justify-content: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .tools-header h1 {
        font-size: 1.8em;
    }
    
    .tool-category {
        padding: 20px;
    }
    
    .tool-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .country-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .country-item span {
        font-size: 1em;
    }
    
    .country-info {
        font-size: 0.8em;
    }
}