html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
} 

header {
    background-color: #DB4437;
    color: white;
    padding: 15px 20px;
    text-align: center;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1), -4px 0 8px rgba(0,0,0,0.05), 4px 0 8px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

h2 {
    color: #DB4437;
    border-bottom: 2px solid #DB4437;
    padding-bottom: 10px;
    margin-top: 30px;
}

h3 {
    color: #b33630;
}

code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.note {
    background: #ffeae9;
    padding: 15px;
    border-left: 4px solid #DB4437;
    margin: 15px 0;
    border-radius: 8px;
}

footer {
    background-color: #DB4437;
    color: white;
    text-align: center;
    padding: 15px;
    position: relative;
    bottom: 0;
    width: 100%;
}

.code-variables {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    width: 100%;
    box-sizing: border-box;
}

.variables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.variable-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.variable-item code {
    background: #ffeae9;
    color: #DB4437;
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    display: inline-block;
}

.variable-item span {
    font-size: 0.9em;
    color: #5f6368;
}

.template-tabs {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 20px 0;
}

.template-tabs input[type="radio"] {
    display: none;
}

.tabs-header {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 20px;
    gap: 10px;
}

.tabs-header label {
    cursor: pointer;
    padding: 10px 20px;
    border: 1px solid #DB4437;
    border-radius: 4px;
    background-color: #fff;
    color: #DB4437;
    flex: 1;
    text-align: center;
    transition: all 0.3s ease;
}

.template-examples .template-example {
    display: none;
    width: 100%;
}

.template-example {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.template-block, .result-block {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.code-block {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
    font-family: monospace;
    white-space: pre-wrap;
}

.code-block.result {
    background: #ffeae9;
    color: #DB4437;
}

.notes-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
}

.calendar-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.calendar-block {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.calendar-block h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

/* Show active tab */
#tab1:checked ~ .template-examples .template-example:nth-of-type(1),
#tab2:checked ~ .template-examples .template-example:nth-of-type(2),
#tab3:checked ~ .template-examples .template-example:nth-of-type(3),
#tab4:checked ~ .template-examples .template-example:nth-of-type(4),
#duo-tab1:checked ~ .template-examples .template-example:nth-of-type(1),
#duo-tab2:checked ~ .template-examples .template-example:nth-of-type(2) {
    display: grid;
}

/* Active tab style */
#tab1:checked ~ .tabs-header label[for="tab1"],
#tab2:checked ~ .tabs-header label[for="tab2"],
#tab3:checked ~ .tabs-header label[for="tab3"],
#tab4:checked ~ .tabs-header label[for="tab4"],
#duo-tab1:checked ~ .tabs-header label[for="duo-tab1"],
#duo-tab2:checked ~ .tabs-header label[for="duo-tab2"] {
    background: #DB4437;
    color: white;
}

@media (max-width: 768px) {
    .variables-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .template-example,
    .notes-container,
    .calendar-pair {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tabs-header label {
        flex: 1 1 calc(50% - 10px);
    }
    
    .variable-item {
        flex-wrap: wrap;
    }
    
    .variable-item code {
        min-width: auto;
        margin-bottom: 4px;
    }
}

@media (max-width: 480px) {
    .variables-grid {
        grid-template-columns: 1fr;
    }
} 